mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
remove unnecessary lazy evaluations
This commit is contained in:
parent
7530d76f00
commit
cc80c5bd07
31 changed files with 50 additions and 51 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue