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

Improve documentation for Iterator's methods #29311

Merged
merged 1 commit into from
Oct 28, 2015

Conversation

steveklabnik
Copy link
Member

This cleans up descriptions, adds more examples, and increases
consistency between similar methods.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

@apasel422
Copy link
Contributor

Hmm, the diff is too big to leave inline comments.

@steveklabnik
Copy link
Member Author

@apasel422 oh no :(

@killercup
Copy link
Member

https://github.com/rust-lang/rust/pull/29311.patch is the raw diff, waiting to be opened in your favorite editor 😄

@steveklabnik steveklabnik force-pushed the doc_iterator_trait branch 2 times, most recently from 21d8795 to 59f9a56 Compare October 26, 2015 00:13
@alexcrichton
Copy link
Member

Hm, @steveklabnik could you split up this commit perhaps for now to review? Without that there's basically no way to easily review this...

@steveklabnik
Copy link
Member Author

@alexcrichton split it up into a bunch of smaller ones. github still shows it as one thing due to it all being in one file, it looks like :/

@nagisa
Copy link
Member

nagisa commented Oct 26, 2015

A common problem with most of the descriptions is use of word “closure” to mean “anything that satisfies Fn{,Mut,Once}”. You can easily pass regular functions to most of the iterators too.

That being said, I have no idea how to word it better so it is as concise and more correct.

@steveklabnik
Copy link
Member Author

@nagisa yeah, it takes a closure, but you can convert a function pointer to a closure.

@steveklabnik steveklabnik force-pushed the doc_iterator_trait branch 2 times, most recently from 59dada7 to 9331766 Compare October 26, 2015 20:35
@steveklabnik
Copy link
Member Author

Okay, fixed up @nagisa 's issues, and re-broke them out.

@steveklabnik
Copy link
Member Author

Oh, and this PR is part of #29360

@alexcrichton
Copy link
Member

Whew, awesome patch @steveklabnik! Just some minor nits here and there, but otherwise r=me with those addressed.

@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 27, 2015

📌 Commit 7b30676 has been approved by alexcrichton

This adds lots of examples, clarifies text, and just generally improves
the documentation for Iterator.
@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton

(I forgot to re-run the tests since i modified some of them, whoops! all pass now)

@bors
Copy link
Collaborator

bors commented Oct 27, 2015

📌 Commit d91785a has been approved by alexcrichton

bors added a commit that referenced this pull request Oct 28, 2015
This cleans up descriptions, adds more examples, and increases
consistency between similar methods.
@bors
Copy link
Collaborator

bors commented Oct 28, 2015

⌛ Testing commit d91785a with merge f717249...

@bors bors merged commit d91785a into rust-lang:master Oct 28, 2015
@steveklabnik steveklabnik deleted the doc_iterator_trait branch June 19, 2016 20:31
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.

7 participants