From debe15d6fd15830968dcf007e309a12944da4948 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Fri, 17 Nov 2023 15:13:04 +0100 Subject: [PATCH] Fix clippy warnings (#1778) --- exercises/practice/custom-set/.meta/example.rs | 6 +++--- justfile | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/exercises/practice/custom-set/.meta/example.rs b/exercises/practice/custom-set/.meta/example.rs index ecb66442d..9a2c918e5 100644 --- a/exercises/practice/custom-set/.meta/example.rs +++ b/exercises/practice/custom-set/.meta/example.rs @@ -49,8 +49,8 @@ impl CustomSet { &self .collection .iter() - .cloned() .filter(|c| other.contains(c)) + .cloned() .collect::>(), ) } @@ -61,8 +61,8 @@ impl CustomSet { &self .collection .iter() + .chain(other.collection.iter()) .cloned() - .chain(other.collection.iter().cloned()) .collect::>(), ) } @@ -73,8 +73,8 @@ impl CustomSet { &self .collection .iter() - .cloned() .filter(|c| !other.contains(c)) + .cloned() .collect::>(), ) } diff --git a/justfile b/justfile index eb2895877..61f517658 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,7 @@ test: ./bin/lint_markdown.sh # TODO shellcheck ./bin/check_exercises.sh + CLIPPY=true ./bin/check_exercises.sh ./bin/ensure_stubs_compile.sh cd rust-tooling && cargo test # TODO format exercises