Skip to content

Commit 8db7482

Browse files
committed
Use div_ceil() in bitmap.rs
1 parent 1c10e93 commit 8db7482

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tree_store/page_store/bitmap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl BtreeBitmap {
120120
if capacity <= 64 {
121121
break;
122122
}
123-
capacity = (capacity + 63) / 64;
123+
capacity = capacity.div_ceil(64);
124124
}
125125

126126
// Reverse so that the root as index 0
@@ -283,7 +283,7 @@ pub(crate) struct U64GroupedBitmap {
283283

284284
impl U64GroupedBitmap {
285285
fn required_words(elements: u32) -> usize {
286-
let words = (elements + 63) / 64;
286+
let words = elements.div_ceil(64);
287287
words as usize
288288
}
289289

0 commit comments

Comments
 (0)