1
Fork 0

clippy::filter_map_identity

This commit is contained in:
Matthias Krüger 2021-07-21 21:53:45 +02:00
parent 066eb6ab5d
commit 053aedce2c
3 changed files with 3 additions and 4 deletions

View file

@ -476,7 +476,7 @@ impl<T> PerNS<Option<T>> {
/// Returns an iterator over the items which are `Some`.
pub fn present_items(self) -> impl Iterator<Item = T> {
IntoIter::new([self.type_ns, self.value_ns, self.macro_ns]).filter_map(|it| it)
IntoIter::new([self.type_ns, self.value_ns, self.macro_ns]).flatten()
}
}