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 option API docs #40999

Merged
merged 4 commits into from
Apr 5, 2017
Merged

Conversation

irfanhudda
Copy link
Contributor

Associated Issue: #29366

Improve option API docs for

  • IntoIter struct
  • Iter struct
  • IterMut struct

r? @steveklabnik

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

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

some nits!

///
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
///
/// This `struct` is created by [`Option::iter`] function.
Copy link
Member

Choose a reason for hiding this comment

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

"by the", please :)

/// An iterator over a reference of the contained item in an [`Option`].
/// An iterator over a reference to the [`Some`] variant of an [`Option`].
///
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
Copy link
Member

Choose a reason for hiding this comment

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

can you remove "variant" here, it sounds more natural without it to me.

///
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
///
/// This `struct` is created by [`Option::iter_mut`] function.
Copy link
Member

Choose a reason for hiding this comment

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

same two comments here

///
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
///
/// This `struct` is created by [`Option::into_iter`] function.
Copy link
Member

Choose a reason for hiding this comment

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

and here

@frewsxcv frewsxcv added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Apr 1, 2017
@irfanhudda
Copy link
Contributor Author

@steveklabnik Thanks for the review. I've made some changes here.

@steveklabnik
Copy link
Member

@bors: r+ rollup

thank you!

@bors
Copy link
Contributor

bors commented Apr 2, 2017

📌 Commit 4c9f8ae has been approved by steveklabnik

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 3, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 3, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 3, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 4, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 4, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 5, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 5, 2017
…teveklabnik

Improve option API docs

Associated Issue: rust-lang#29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik
bors added a commit that referenced this pull request Apr 5, 2017
@bors bors merged commit 4c9f8ae into rust-lang:master Apr 5, 2017
@chordowl chordowl mentioned this pull request Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants