remove unnecessary lazy evaluations

This commit is contained in:
Daniel Eades 2022-12-30 08:30:23 +00:00
parent 7530d76f00
commit cc80c5bd07
31 changed files with 50 additions and 51 deletions

View file

@ -61,7 +61,7 @@ impl TraitEnvironment {
) -> impl Iterator<Item = TraitId> + 'a {
self.traits_from_clauses
.iter()
.filter_map(move |(self_ty, trait_id)| (*self_ty == ty).then(|| *trait_id))
.filter_map(move |(self_ty, trait_id)| (*self_ty == ty).then_some(*trait_id))
}
}