From be6d5bfb9cf13a4cac39a582ad33c95f9daa4be9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 18 Mar 2023 14:50:43 +0100 Subject: [PATCH] Fix some redundant closure in test_shurf --- tests/by-util/test_shuf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_shuf.rs b/tests/by-util/test_shuf.rs index 39a7a640b..23851aacc 100644 --- a/tests/by-util/test_shuf.rs +++ b/tests/by-util/test_shuf.rs @@ -10,7 +10,7 @@ fn test_output_is_random_permutation() { let input_seq = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let input = input_seq .iter() - .map(|x| x.to_string()) + .map(ToString::to_string) .collect::>() .join("\n"); @@ -52,7 +52,7 @@ fn test_echo() { .args( &input_seq .iter() - .map(|x| x.to_string()) + .map(ToString::to_string) .collect::>(), ) .succeeds(); @@ -74,7 +74,7 @@ fn test_head_count() { let input_seq = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let input = input_seq .iter() - .map(|x| x.to_string()) + .map(ToString::to_string) .collect::>() .join("\n"); @@ -105,7 +105,7 @@ fn test_repeat() { let input_seq = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let input = input_seq .iter() - .map(|x| x.to_string()) + .map(ToString::to_string) .collect::>() .join("\n");