From dff71b94f6c5755e28fd3d333444887c2b6047eb Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 25 Jul 2024 20:53:43 +0700 Subject: [PATCH] Fix `clippy::needless_borrows_for_generic_args` lints --- src/util.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.rs b/src/util.rs index 2e133b19..f9e5d16e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -193,7 +193,7 @@ mod tests { fn file_name(name: &str, prefix: &str, suffix: &str) -> String { let container: HashSet = HashSet::new(); - user_name_to_file_name(&Name::new_raw(name), prefix, suffix, |name| { + user_name_to_file_name(Name::new_raw(name), prefix, suffix, |name| { !container.contains(name) }) .to_string_lossy() @@ -292,7 +292,7 @@ mod tests { let mut container = HashSet::new(); let mut existing = HashSet::new(); for name in ["Ab", "a_b"] { - let path = user_name_to_file_name(&Name::new_raw(name), "", ".glif", |name| { + let path = user_name_to_file_name(Name::new_raw(name), "", ".glif", |name| { !existing.contains(name) }); existing.insert(path.to_string_lossy().to_string().to_lowercase()); @@ -311,7 +311,7 @@ mod tests { let mut container = HashSet::new(); let mut existing = HashSet::new(); for name in ["A".repeat(300), "a_".repeat(150)] { - let path = user_name_to_file_name(&Name::new_raw(&name), "", ".glif", |name| { + let path = user_name_to_file_name(Name::new_raw(&name), "", ".glif", |name| { !existing.contains(name) }); existing.insert(path.to_string_lossy().to_string().to_lowercase());