From f1abd8577c824eac4eb152a4b0789ce23642ba62 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 22 Aug 2024 14:41:25 +0200 Subject: Add missing Clippy allows to solutions --- solutions/18_iterators/iterators4.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'solutions/18_iterators/iterators4.rs') diff --git a/solutions/18_iterators/iterators4.rs b/solutions/18_iterators/iterators4.rs index 4c3c49d..4168835 100644 --- a/solutions/18_iterators/iterators4.rs +++ b/solutions/18_iterators/iterators4.rs @@ -25,6 +25,7 @@ fn factorial_fold(num: u64) -> u64 { // -> 1 * 2 is calculated, then the result 2 is multiplied by // the second element 3 so the result 6 is returned. // And so on… + #[allow(clippy::unnecessary_fold)] (2..=num).fold(1, |acc, x| acc * x) } -- cgit v1.2.3