Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPC
fix a couple of stylistic clippy warnings namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
This commit is contained in:
commit
a6c4d30c7b
9 changed files with 10 additions and 12 deletions
|
@ -387,7 +387,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||
if let ReturnConstraint::ClosureUpvar(upvar) = kind {
|
||||
let def_id = match self.regioncx.universal_regions().defining_ty {
|
||||
DefiningTy::Closure(def_id, _) => def_id,
|
||||
ty @ _ => bug!("unexpected DefiningTy {:?}", ty),
|
||||
ty => bug!("unexpected DefiningTy {:?}", ty),
|
||||
};
|
||||
|
||||
let upvar_def_span = self.infcx.tcx.hir().span(upvar);
|
||||
|
|
|
@ -126,7 +126,7 @@ impl OptimizationFinder<'b, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
return None;
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue