1
Fork 0

Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisa

more clippy::complexity fixes

(also a couple of clippy::perf fixes)
This commit is contained in:
bors 2021-08-01 09:15:15 +00:00
commit aadd6189ad
32 changed files with 44 additions and 51 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()
}
}