Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Implement RFC 580 #22483

wants to merge 1 commit into from

Conversation

aturon
Copy link
Member

@aturon aturon commented Feb 18, 2015

This commit implements RFC 580 by renaming:

  • DList -> LinkedList
  • Bitv -> BitVec
  • BitvSet -> BitSet
  • RingBuf -> VecDeque

More details are in the RFC

[breaking-change]

r? @gankro

cc @CloudiDust

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.
Copy link
Contributor

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?

@Manishearth
Copy link
Member

Needs a rebase, sorry.

@aturon aturon force-pushed the rfc-580 branch 2 times, most recently from 0d303c9 to 540b8db Compare February 18, 2015 18:01
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]
@aturon
Copy link
Member Author

aturon commented Feb 18, 2015

Rebased and ready for review.

@Gankra
Copy link
Contributor

Gankra commented Feb 18, 2015

Merged into #22491

@Gankra Gankra closed this Feb 18, 2015
//! | 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) |
Copy link
Contributor

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 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants