Skip to content

Commit ec467ca

Browse files
authored
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`.
1 parent 6b89333 commit ec467ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ impl<'b> BorrowRefMut<'b> {
17561756
let borrow = self.borrow.get();
17571757
debug_assert!(is_writing(borrow));
17581758
// Prevent the borrow counter from underflowing.
1759-
assert!(borrow != isize::MIN);
1759+
assert!(borrow != BorrowFlag::MIN);
17601760
self.borrow.set(borrow - 1);
17611761
BorrowRefMut { borrow: self.borrow }
17621762
}

0 commit comments

Comments
 (0)