-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement append and split_off for BitVec (RFC 509) #24890
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
Conversation
#[unstable(feature = "collections", | ||
reason = "recently added as part of collections reform 2")] | ||
pub fn append(&mut self, other: &mut Self) { | ||
let b = self.len() % u32::BITS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate a more useful name than b
.
Sorry for the delayed response. Review done! |
a2f1c3f
to
fb9419a
Compare
Thank you for your review! I fixed everything you noted, except for the assertion regarding the internal representation and the feature gate. |
Alright, r=me with the feature gate fixed (which I'll go ping someone to get an answer on). |
fb9419a
to
7311394
Compare
I have changed the name of the feature gate to |
/// # Examples | ||
/// | ||
/// ``` | ||
/// # #![feature(collections)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the feature list in this documentation (and the above example) will need to be updated. You can also be sure to run these tests with make check-stage2-doc-crate-collections
7311394
to
9fa6e4c
Compare
@alexcrichton Fixed everything you noted and had to update the call to Vec::drain since it takes a range parameter now. |
⌛ Testing commit 9fa6e4c with merge 3d544f2... |
💔 Test failed - auto-mac-64-opt |
9fa6e4c
to
d55a7e8
Compare
Ahh, I forgot to enable the feature gate in libcollectionstest. Sorry for wasting CPU time! |
cc #19986
r? @gankro