mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +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
|
||||
.to_str()
|
||||
.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('/'))
|
||||
} else {
|
||||
normalized_path.as_path()
|
||||
|
||||
Reference in New Issue
Block a user