Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/borrowck.rs')
| -rw-r--r-- | crates/hir-ty/src/mir/borrowck.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-ty/src/mir/borrowck.rs b/crates/hir-ty/src/mir/borrowck.rs index 186921ae7a..f7d043fc4e 100644 --- a/crates/hir-ty/src/mir/borrowck.rs +++ b/crates/hir-ty/src/mir/borrowck.rs @@ -339,11 +339,8 @@ fn push_mut_span(local: LocalId, span: MirSpan, result: &mut ArenaMap<LocalId, M } fn record_usage(local: LocalId, result: &mut ArenaMap<LocalId, MutabilityReason>) { - match &mut result[local] { - it @ MutabilityReason::Unused => { - *it = MutabilityReason::Not; - } - _ => (), + if let it @ MutabilityReason::Unused = &mut result[local] { + *it = MutabilityReason::Not; }; } |