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

documentation update to demonstrate mutability #44467

Merged
merged 1 commit into from
Sep 10, 2017
Merged

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Sep 9, 2017

#44467

  • demonstrate correct implementation returns Some
  • demonstrate out of bounds returns None
  • demonstrate mutability

@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 @aturon (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.

@toidiu
Copy link
Contributor Author

toidiu commented Sep 9, 2017

r? @frewsxcv

Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

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

lgtm! will wait for travis before approving for merge. thanks!

/// assert_eq!("hello", v);
/// {
/// let s = v.get_mut(0..2);
/// let s = s.map(|s| {
Copy link
Member

@frewsxcv frewsxcv Sep 9, 2017

Choose a reason for hiding this comment

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

alternatively, something like this could maybe work here, but what you have is 🆒 too

if let Some(s) = v.get_mut(0..2) {
    s.make_ascii_uppercase();
}

@frewsxcv
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 10, 2017

📌 Commit c430fa8 has been approved by frewsxcv

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 10, 2017
documentation update to demonstrate mutability

rust-lang#44467

- demonstrate correct implementation returns `Some`
- demonstrate out of bounds returns `None`
- demonstrate mutability
bors added a commit that referenced this pull request Sep 10, 2017
Rollup of 13 pull requests

- Successful merges: #44262, #44329, #44332, #44347, #44372, #44384, #44387, #44396, #44449, #44451, #44457, #44464, #44467
- Failed merges:
@bors bors merged commit c430fa8 into rust-lang:master Sep 10, 2017
@toidiu toidiu deleted the ak-44382 branch September 29, 2017 04:23
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.

5 participants