mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Avoid unnecessary string uses
This commit is contained in:
@@ -341,7 +341,7 @@ fn match_in_path_list<'a>(path: &Path, candidates: &'a HashSet<&Path>) -> Result
|
|||||||
let normalized_path_str = normalized_path
|
let normalized_path_str = normalized_path
|
||||||
.to_str()
|
.to_str()
|
||||||
.expect("Input path contains invalid characters");
|
.expect("Input path contains invalid characters");
|
||||||
let normalized_path_without_slash = if normalized_path_str.ends_with("/") {
|
let normalized_path_without_slash = if normalized_path_str.ends_with('/') {
|
||||||
Path::new(normalized_path_str.trim_end_matches('/'))
|
Path::new(normalized_path_str.trim_end_matches('/'))
|
||||||
} else {
|
} else {
|
||||||
normalized_path.as_path()
|
normalized_path.as_path()
|
||||||
|
|||||||
Reference in New Issue
Block a user