mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 18:10:14 +01:00
add BitVec::len
This commit is contained in:
parent
571cf73510
commit
8ceaef72fa
|
@ -39,6 +39,10 @@ impl BitVec {
|
|||
self.data.fill(byte);
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.data.len()
|
||||
}
|
||||
|
||||
fn get_indexes(&self, index: usize) -> (usize, u8) {
|
||||
let byte_index = index / 8;
|
||||
let bit_in_byte_index = 7 - index % 8;
|
||||
|
|
Loading…
Reference in a new issue