Use Mutability::{is_mut, is_not}
This commit is contained in:
parent
fd649a3cc5
commit
4d75f61832
11 changed files with 13 additions and 21 deletions
|
@ -416,11 +416,7 @@ impl<'tcx> Body<'tcx> {
|
|||
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
|
||||
let local = Local::new(index);
|
||||
let decl = &self.local_decls[local];
|
||||
if decl.is_user_variable() && decl.mutability == Mutability::Mut {
|
||||
Some(local)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if decl.is_user_variable() && decl.mutability.is_mut() { Some(local) } else { None }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue