Merge recent update from ch7 && cargo clippy
This commit is contained in:
parent
737340b0a0
commit
c9583b0f53
20 changed files with 236 additions and 163 deletions
|
@ -17,7 +17,7 @@ pub struct Bitmap {
|
|||
/// Return (block_pos, bits64_pos, inner_pos)
|
||||
fn decomposition(mut bit: usize) -> (usize, usize, usize) {
|
||||
let block_pos = bit / BLOCK_BITS;
|
||||
bit = bit % BLOCK_BITS;
|
||||
bit %= BLOCK_BITS;
|
||||
(block_pos, bit / 64, bit % 64)
|
||||
}
|
||||
|
||||
|
@ -70,4 +70,4 @@ impl Bitmap {
|
|||
pub fn maximum(&self) -> usize {
|
||||
self.blocks * BLOCK_BITS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue