Skip to content

Conversation

ivan
Copy link
Contributor

@ivan ivan commented Feb 24, 2016

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 :-)

@steveklabnik
Copy link
Contributor

@bors: r+ rollup

thank you!

@bors
Copy link
Collaborator

bors commented Feb 24, 2016

📌 Commit 7042c8e has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2016
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 :-)
bors added a commit that referenced this pull request Feb 24, 2016
@bors bors merged commit 7042c8e into rust-lang:master Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants