HaoYang670 opened a new issue #1337:
URL: https://github.com/apache/arrow-rs/issues/1337
**Expected behavior**
A clear and concise description of what you expected to happen.
```rust
pub fn new(num_bits: usize) -> Self {
let num_bytes = num_bits / 8 + if num_bits % 8 > 0 { 1 } else { 0 };
let r = num_bytes % 64;
let len = if r == 0 {
num_bytes
} else {
num_bytes + 64 - r
};
Bitmap {
bits: Buffer::from(&vec![0xFF; len]),
}
}
```
We can use `bit_util::ceil` and `bit_util::round_upto_multiple_of_64` to
refactor the code.
**Additional context**
Notice when working on #1230
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]