Merge pull request #1386 from cyril-marpaud/cmp_arc1

refactor(arc1): improve readability by avoiding implicit dereference
This commit is contained in:
liv 2023-02-19 12:34:52 +01:00 committed by GitHub
commit 701b4bef51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ fn main() {
for offset in 0..8 {
let child_numbers = // TODO
joinhandles.push(thread::spawn(move || {
let sum: u32 = child_numbers.iter().filter(|n| *n % 8 == offset).sum();
let sum: u32 = child_numbers.iter().filter(|&&n| n % 8 == offset).sum();
println!("Sum of offset {} is {}", offset, sum);
}));
}