From b60139ce77b5151a9ccdf04729849f43b4086856 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 2 Jan 2022 20:26:54 +0100 Subject: [PATCH] Avoid unnecessary string uses --- tools/yabridgectl/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs index 5d5d940c..4167c08d 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs @@ -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()