Skip to content

Describe the Iterator enumerate() method more clearly. #24440

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

Merged
merged 1 commit into from
Apr 16, 2015

Conversation

nham
Copy link
Contributor

@nham nham commented Apr 15, 2015

I found that the current description of enumerate() doesn't actually tell you what, specifically, the method does, and you have to look at the example to figure it out. Here's a description that I think is better.

@rust-highfive
Copy link
Contributor

r? @aturon

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

/// iterator plus the current index of iteration.
/// Creates an iterator that yields pairs `(i, val)` where `i` is the
/// current index of iteration and `val` is the value returned by the
/// iterator
Copy link
Contributor

Choose a reason for hiding this comment

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

s/iterator/iterator./

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, oops! Fixing...

@alexcrichton
Copy link
Member

Thanks! Could you squash the commits together as well?

@nham nham force-pushed the improve_enumerate_doc branch from d78a972 to 2b86f1f Compare April 15, 2015 18:39
@nham
Copy link
Contributor Author

nham commented Apr 15, 2015

Done

@alexcrichton
Copy link
Member

@bors: r+ 2b86f1f rollup

Thanks!

@alexcrichton alexcrichton assigned alexcrichton and unassigned aturon Apr 15, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 15, 2015
…richton

I found that the current description of `enumerate()` doesn't actually tell you what, specifically, the method does, and you have to look at the example to figure it out. Here's a description that I think is better.
bors added a commit that referenced this pull request Apr 15, 2015
@bors bors merged commit 2b86f1f into rust-lang:master Apr 16, 2015
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.

6 participants