Address review comments
This commit is contained in:
parent
e3945bd3a8
commit
88cd821e62
2 changed files with 7 additions and 5 deletions
|
@ -734,8 +734,8 @@ impl BindingAnnotation {
|
|||
}
|
||||
|
||||
pub fn cap_ref_mutability(mut self, mutbl: Mutability) -> Self {
|
||||
if let ByRef::Yes(old_mutbl) = self.0 {
|
||||
self.0 = ByRef::Yes(cmp::min(old_mutbl, mutbl));
|
||||
if let ByRef::Yes(old_mutbl) = &mut self.0 {
|
||||
*old_mutbl = cmp::min(*old_mutbl, mutbl);
|
||||
}
|
||||
self
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue