Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obk
compiler: clippy::complexity fixes useless_format map_flatten useless_conversion needless_bool filter_next clone_on_copy needless_option_as_deref
This commit is contained in:
commit
a144ea1c4b
22 changed files with 39 additions and 45 deletions
|
@ -1437,8 +1437,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
|
|||
self.tcx
|
||||
.associated_items(did)
|
||||
.in_definition_order()
|
||||
.filter(|assoc| assoc.ident(self.tcx) == trait_assoc_ident)
|
||||
.next()
|
||||
.find(|assoc| assoc.ident(self.tcx) == trait_assoc_ident)
|
||||
},
|
||||
)
|
||||
})
|
||||
|
|
|
@ -959,7 +959,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
|
|||
infcx.inner.borrow_mut().projection_cache().insert_term(cache_key, result.clone());
|
||||
}
|
||||
obligations.extend(result.obligations);
|
||||
Ok(Some(result.value.into()))
|
||||
Ok(Some(result.value))
|
||||
}
|
||||
Ok(Projected::NoProgress(projected_ty)) => {
|
||||
let result = Normalized { value: projected_ty, obligations: vec![] };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue