]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #31870 - ivan:filter-explain, r=steveklabnik
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)
As a Rust newbie, I found the book's explanation for why the `filter` closure gets a reference very confusing, and tried to figure out why `filter` is somehow less consumptive than `map` -- but it isn't; that's controlled by `iter`/`into_iter`.  I flailed around for a while until @habnabit explained it to me, and in retrospect it is quite obvious :-)


Trivial merge