Add missing Clippy allows to solutions

This commit is contained in:
mo8it
2024-08-22 14:41:25 +02:00
parent 423b50b068
commit f1abd8577c
2 changed files with 4 additions and 4 deletions
+1
View File
@@ -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)
}