Use BorrowFlag instead of explicit isize
The integer type tracking borrow count has a typedef called `BorrowFlag`. This type should be used instead of explicit `isize`.
This commit is contained in:
parent
0c2c243342
commit
c4c428b6da
1 changed files with 1 additions and 1 deletions
|
@ -1756,7 +1756,7 @@ impl<'b> BorrowRefMut<'b> {
|
||||||
let borrow = self.borrow.get();
|
let borrow = self.borrow.get();
|
||||||
debug_assert!(is_writing(borrow));
|
debug_assert!(is_writing(borrow));
|
||||||
// Prevent the borrow counter from underflowing.
|
// Prevent the borrow counter from underflowing.
|
||||||
assert!(borrow != isize::MIN);
|
assert!(borrow != BorrowFlag::MIN);
|
||||||
self.borrow.set(borrow - 1);
|
self.borrow.set(borrow - 1);
|
||||||
BorrowRefMut { borrow: self.borrow }
|
BorrowRefMut { borrow: self.borrow }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue