-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove bitslice.rs #54177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove bitslice.rs #54177
Conversation
So that the `BitArray` code is all together and before the `BitVector` code, instead of being awkwardly interleaved.
This requires the following changes. - It moves parts of bitslice.rs into bitvec.rs: `bitwise()`, `BitwiseOperator`, `bits_to_string()`. - It changes `IdxSet` to just be a wrapper around `BitArray`. - It changes `BitArray` and `BitVec` to use `usize` words instead of `u128` words. (`BitSlice` and `IdxSet` already use `usize`.) Local profiling showed `usize` was better. - It moves some operations from `IdxSet` into `BitArray`: `new_filled()`, `clear()`, `set_up_to()`, `trim_to()` (renamed `clear_above()`), `words()` and `words_mut()`, `encode()` and `decode(). The `IdxSet` operations now just call the `BitArray` operations. - It replaces `BitArray`'s iterator implementation with `IdxSet`'s, because the latter is more concise. It also removes the buggy `size_hint` function from `BitArray`'s iterator, which counted the number of *words* rather than the number of *bits*. `IdxSet`'s iterator is now just a thin wrapper around `BitArray`'s iterator. - It moves some unit tests from `indexed_set.rs` to `bitvec.rs`.
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
Local benchmarking runs showed that this change had no effect on performance. |
r? @Mark-Simulacrum on the updated changes. |
@bors r+ |
📌 Commit e38b31eb6e6e4b564ecb36956a29d05e6921ce24 has been approved by |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Because they're just thin wrappers around `BitIter` and `slice::Iter`.
e38b31e
to
56be2af
Compare
@Mark-Simulacrum: I fixed the compile errors. |
@bors r+ delegate+ |
✌️ @nnethercote can now approve this pull request |
📌 Commit 56be2af has been approved by |
r=Mark-Simulacrum |
…acrum Remove bitslice.rs As the comment in `bitslice.rs` says: > FIXME: merge with `bitvec`
☀️ Test successful - status-appveyor, status-travis |
As the comment in
bitslice.rs
says: