clippy::complexity fixes
This commit is contained in:
parent
0157cc977f
commit
e6f77a1787
18 changed files with 23 additions and 30 deletions
|
@ -263,7 +263,7 @@ impl<'a, 'tcx> Helper<'a, 'tcx> {
|
|||
}
|
||||
|
||||
// check that the value being matched on is the same. The
|
||||
if this_bb_discr_info.targets_with_values.iter().find(|x| x.0 == value).is_none() {
|
||||
if !this_bb_discr_info.targets_with_values.iter().any(|x| x.0 == value) {
|
||||
trace!("NO: values being matched on are not the same");
|
||||
return None;
|
||||
}
|
||||
|
|
|
@ -111,8 +111,7 @@ impl<'a, 'tcx> Patcher<'a, 'tcx> {
|
|||
Operand::Copy(place) | Operand::Move(place) => {
|
||||
// create new local
|
||||
let ty = operand.ty(self.local_decls, self.tcx);
|
||||
let local_decl =
|
||||
LocalDecl::with_source_info(ty, statement.source_info.clone());
|
||||
let local_decl = LocalDecl::with_source_info(ty, statement.source_info);
|
||||
let local = self.local_decls.push(local_decl);
|
||||
// make it live
|
||||
let mut make_live_statement = statement.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue