-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
VecDeque docs should mention in which direction indices go #34920
Comments
Interested in doing it? It is quite an easy change. :) |
I can work on this. |
@abhijeetbhagat: Please do. |
@abhijeetbhagat: I need a PR to review. 😛 |
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Jul 25, 2016
…Gomez Update VecDeque documentation to specify direction of index 0 (rust-lang#34920) I mentioned the direction for all the methods that work with an index
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Jul 26, 2016
…Gomez Update VecDeque documentation to specify direction of index 0 (rust-lang#34920) I mentioned the direction for all the methods that work with an index
@GuillaumeGomez since this change got merged you might want to close the issue. I just came across this browsing the docs tag thinking it was still open. |
@mgattozzi: Thanks for notifying me! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not clear to me whether index 0 is the front or the back of the deque. For example, the
std::collections::vec_deque
module docs only say "It also has O(1) indexing like a vector." and the documentation ofVecDeque::get
only states "Retrieves an element in the VecDeque by index." and the example retrieves the middle element of a three-element deque. From the iteration order, or the example inswap
, I can infer that it's from the front (and of course I could try it out) but it's would have saved me some time if it was just stated up-front in the relevant locations.The text was updated successfully, but these errors were encountered: