mirror of
https://github.com/microsoft/RustTraining.git
synced 2026-05-06 06:06:43 -04:00
ch12-colsures: Correct partition example to deref n
Signed-off-by: Daivid Frank <daividfrank@microsoft.com>
This commit is contained in:
@@ -140,7 +140,7 @@ fn main() {
|
||||
// Approach 2: Single pass with partition()
|
||||
let (evens, odds): (Vec<i32>, Vec<i32>) = numbers
|
||||
.into_iter()
|
||||
.partition(|n| n % 2 == 0);
|
||||
.partition(|n| *n % 2 == 0);
|
||||
println!("Evens (partition): {evens:?}");
|
||||
println!("Odds (partition): {odds:?}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user