clippy::complexity fixes
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
This commit is contained in:
parent
48b3c46126
commit
1da4a49912
15 changed files with 26 additions and 54 deletions
|
@ -2059,12 +2059,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
) -> Option<InitIndex> {
|
||||
let mpi = self.move_data.rev_lookup.find_local(local);
|
||||
let ii = &self.move_data.init_path_map[mpi];
|
||||
for &index in ii {
|
||||
if flow_state.ever_inits.contains(index) {
|
||||
return Some(index);
|
||||
}
|
||||
}
|
||||
None
|
||||
ii.into_iter().find(|&&index| flow_state.ever_inits.contains(index)).copied()
|
||||
}
|
||||
|
||||
/// Adds the place into the used mutable variables set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue