From 0d51c6762d5e96ce208572d33cd28fe84b2cafd3 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Fri, 9 Aug 2024 15:11:49 +0200 Subject: [PATCH] Cleanup new_without_default workarounds --- bin/ensure_stubs_compile.sh | 2 +- exercises/practice/grade-school/src/lib.rs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/ensure_stubs_compile.sh b/bin/ensure_stubs_compile.sh index d0d743a81..08c700265 100755 --- a/bin/ensure_stubs_compile.sh +++ b/bin/ensure_stubs_compile.sh @@ -61,7 +61,7 @@ for dir in $changed_exercises; do # since we're generally not going to test it. if ! ( cd "$dir" && - cargo clippy --lib --tests --color always -- --allow clippy::new_without_default 2>clippy.log + cargo clippy --lib --tests --color always -- 2>clippy.log ); then cat "$dir/clippy.log" broken="$broken\n$exercise" diff --git a/exercises/practice/grade-school/src/lib.rs b/exercises/practice/grade-school/src/lib.rs index f90a271c1..da3f53603 100644 --- a/exercises/practice/grade-school/src/lib.rs +++ b/exercises/practice/grade-school/src/lib.rs @@ -1,10 +1,3 @@ -// This annotation prevents Clippy from warning us that `School` has a -// `fn new()` with no arguments, but doesn't implement the `Default` trait. -// -// Normally, it's good practice to just do what Clippy tells you, but in this -// case, we want to keep things relatively simple. The `Default` trait is not the point -// of this exercise. -#[allow(clippy::new_without_default)] pub struct School {} impl School {