mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Simplify the boolean logic in a closure.
And rename a closure argument.
This commit is contained in:
parent
8e7fd55131
commit
1c583c0b91
@ -1230,12 +1230,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
|
||||
};
|
||||
|
||||
let mut deduped: SsoHashSet<_> = Default::default();
|
||||
result.obligations.retain(|projected_obligation| {
|
||||
if !deduped.insert(projected_obligation.clone()) {
|
||||
return false;
|
||||
}
|
||||
true
|
||||
});
|
||||
result.obligations.retain(|obligation| deduped.insert(obligation.clone()));
|
||||
|
||||
if use_cache {
|
||||
infcx.inner.borrow_mut().projection_cache().insert_term(cache_key, result.clone());
|
||||
|
Loading…
Reference in New Issue
Block a user