`Iterator::filter_map` is analogous to `Iterator::map`, not `Iterator::flat_map`
pull/304/head
Andrew Sonin 2 years ago committed by GitHub
parent d510bc2431
commit 482c2b8720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,7 +50,7 @@ iterator which yields exactly one element. It's a more readable alternative to
`Some(foo).into_iter()`.
* [`Iterator::filter_map`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.filter_map)
is a version of [`Iterator::flat_map`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flat_map),
is a version of [`Iterator::map`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map),
specialized to mapping functions which return `Option`.
* The [`ref_slice`](https://crates.io/crates/ref_slice) crate provides functions

Loading…
Cancel
Save