-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement RFC 580 #22483
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
Implement RFC 580 #22483
Conversation
static INITIAL_CAPACITY: usize = 7; // 2^3 - 1 | ||
static MINIMUM_CAPACITY: usize = 1; // 2 - 1 | ||
|
||
/// `RingBuf` is a circular buffer, which can be used as a double-ended queue efficiently. | ||
/// `VecDeque` is a circular buffer, which can be used as a double-ended queue efficiently. |
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.
Could you add the word "ring buffer" to the documentation so you can find this collection if you want something akin to a ring buffer?
Needs a rebase, sorry. |
0d303c9
to
540b8db
Compare
This commit implements RFC 580 by renaming: * DList -> LinkedList * Bitv -> BitVec * BitvSet -> BitSet * RingBuf -> VecDeque More details are in [the RFC](rust-lang/rfcs#580) [breaking-change]
Rebased and ready for review. |
Merged into #22491 |
//! | Bitv | O(1) | O(n-i)* | O(n-i) | O(m)* | O(n-i) | | ||
//! | VecDeque | O(1) | O(min(i, n-i))* | O(min(i, n-i)) | O(m)* | O(min(i, n-i)) | | ||
//! | LinkedList | O(min(i, n-i)) | O(min(i, n-i)) | O(min(i, n-i)) | O(1) | O(min(i, n-i)) | | ||
//! | BitVec | O(1) | O(n-i)* | O(n-i) | O(m)* | O(n-i) | |
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.
RIP nice computer-generated ASCII table 😭
This commit implements RFC 580 by renaming:
More details are in the RFC
[breaking-change]
r? @gankro
cc @CloudiDust