be more explicit about dereferencing
[rust-101.git] / workspace / src / part10.rs
index f7d9028ad46a15e9ccc4a0b11fca8b1d84584b28..7af161716f6a07971f499351081defbef299100f 100644 (file)
@@ -76,7 +76,7 @@ pub fn print_and_count(b: &BigInt) {
 
 // Let's say we want to write a function that increments every entry of a `Vec` by some number, then looks for numbers larger than some threshold, and prints them.
 fn inc_print_even(v: &Vec<i32>, offset: i32, threshold: i32) {
-    for i in v.iter().map(|n| n + offset).filter(|n| *n > threshold) {
+    for i in v.iter().map(|n| *n + offset).filter(|n| *n > threshold) {
         println!("{}", i);
     }
 }