From 348aeea09569cad28130d082f3b59671ae276b01 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 11 May 2022 21:17:31 -0400 Subject: [PATCH] clippy --- tests/parsing.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/parsing.rs b/tests/parsing.rs index cb436b0..f3437c4 100644 --- a/tests/parsing.rs +++ b/tests/parsing.rs @@ -161,13 +161,12 @@ fn hint_to_string() { fn invalid_function() { SUPPORTED_FUNCTIONS .iter() - .map(|func1| { + .flat_map(|func1| { SUPPORTED_FUNCTIONS .iter() .map(|func2| func1.to_string() + func2) .collect::>() }) - .flatten() .filter(|func| !SUPPORTED_FUNCTIONS.contains(&func.as_str())) .for_each(|key| { let split = parsing::split_function(&key); @@ -180,7 +179,7 @@ fn invalid_function() { if generated_hint.is_none() { println!("success: {}", key); } else { - panic!("failed: {} (Hint: '{}')", key, generated_hint.to_string()); + panic!("failed: {} (Hint: '{}')", key, generated_hint); } }); } @@ -216,7 +215,7 @@ fn hint_tests() { } { - let hint = Hint::Single(&""); + let hint = Hint::Single(""); assert!(!hint.is_none()); assert!(hint.is_some()); assert!(hint.is_single());