Skip to content
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

document DoubleEndedIterator::next_back #34732

Merged
merged 1 commit into from
Jul 27, 2016
Merged

Conversation

durka
Copy link
Contributor

@durka durka commented Jul 9, 2016

document DoubleEndedIterator::next_back

fixes #34726

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@durka
Copy link
Contributor Author

durka commented Jul 9, 2016

r? @apasel422

@@ -386,10 +386,11 @@ pub trait Extend<A> {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub trait DoubleEndedIterator: Iterator {
/// An iterator able to yield elements from both ends.
/// Removes and returns an element from the end of the iterator.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really removes an element from the iterated object?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better as something like "Yields an element from the back of the iterator."

Copy link
Member

@GuillaumeGomez GuillaumeGomez Jul 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both sound inaccurate to me. :-/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it does remove an element. So does next() (from the beginning). Why
do you think this sounds wrong?

On Mon, Jul 11, 2016 at 11:16 AM, Guillaume Gomez [email protected]
wrote:

In src/libcore/iter/traits.rs
#34732 (comment):

@@ -386,10 +386,11 @@ pub trait Extend {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub trait DoubleEndedIterator: Iterator {

  • /// An iterator able to yield elements from both ends.
  • /// Removes and returns an element from the end of the iterator.

Both sounds inaccurate to me. :-/


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rust/pull/34732/files/b4ff6b028ed6ae2e67d97604ad6bfbd235bb4f74#r70277691,
or mute the thread
https://github.com/notifications/unsubscribe/AAC3nwp6zp2zpXgSnW_EAfiiwCdWX9-eks5qUl5ogaJpZM4JIh0J
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, when I reread the array (but calling again .iter()), the elements have been removed. If that's the case then all good.

@apasel422 apasel422 removed their assignment Jul 11, 2016
@apasel422
Copy link
Contributor

Ping @steveklabnik

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2016

📌 Commit b4ff6b0 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 25, 2016
document DoubleEndedIterator::next_back

document DoubleEndedIterator::next_back

fixes rust-lang#34726
bors added a commit that referenced this pull request Jul 25, 2016
Rollup of 13 pull requests

- Successful merges: #34461, #34609, #34732, #34850, #34894, #34935, #34974, #34990, #34995, #35001, #35009, #35010, #35028
- Failed merges:
@bors
Copy link
Contributor

bors commented Jul 26, 2016

⌛ Testing commit b4ff6b0 with merge c23561c...

@bors
Copy link
Contributor

bors commented Jul 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 26, 2016 at 4:05 AM, bors [email protected] wrote:

💔 Test failed - auto-win-msvc-64-opt
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/5084


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#34732 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95OurAzDyqVwT7XXx1S74Bbjx8ZQsks5qZeoOgaJpZM4JIh0J
.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 26, 2016
document DoubleEndedIterator::next_back

document DoubleEndedIterator::next_back

fixes rust-lang#34726
bors added a commit that referenced this pull request Jul 27, 2016
@bors bors merged commit b4ff6b0 into rust-lang:master Jul 27, 2016
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.

Doc for DoubleEndedIterator::next_back doesn't belong on method
7 participants