From: Ralf Jung Date: Wed, 14 Sep 2016 07:17:39 +0000 (+0200) Subject: Better name for inc_print_even X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/5733ee975f1c72c27a4c2530f502786e777a8cc7?hp=--cc Better name for inc_print_even Fixes #17 --- 5733ee975f1c72c27a4c2530f502786e777a8cc7 diff --git a/src/part10.rs b/src/part10.rs index 6fa8f1e..66d18ff 100644 --- a/src/part10.rs +++ b/src/part10.rs @@ -108,7 +108,7 @@ pub fn print_and_count(b: &BigInt) { //@ Rust provides a whole lot of methods on iterators that allow us to write pretty functional-style list manipulation. // 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, offset: i32, threshold: i32) { +fn inc_print_threshold(v: &Vec, offset: i32, threshold: i32) { //@ `map` takes a closure that is applied to every element of the iterator. `filter` removes elements //@ from the iterator that do not pass the test given by the closure. //@