Skip to content

documentation update to demonstrate mutability - #44467

Merged
bors merged 1 commit into
rust-lang:masterfrom
toidiu:ak-44382
Sep 10, 2017
Merged

documentation update to demonstrate mutability#44467
bors merged 1 commit into
rust-lang:masterfrom
toidiu:ak-44382

Conversation

@toidiu

@toidiutoidiu commented Sep 9, 2017

Copy link
Copy Markdown
Contributor

#44467

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

@rust-highfive

Copy link
Copy Markdown
Contributor

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

toidiu commented Sep 9, 2017

Copy link
Copy Markdown
ContributorAuthor

r? @frewsxcv

@frewsxcvfrewsxcv left a comment

Copy link
Copy Markdown
Contributor

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!

Comment threadsrc/liballoc/str.rs
/// assert_eq!("hello", v);
/// {
/// let s = v.get_mut(0..2);
/// let s = s.map(|s| {

@frewsxcvfrewsxcvSep 9, 2017

Copy link
Copy Markdown
Contributor

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

ifletSome(s) = v.get_mut(0..2){
s.make_ascii_uppercase();}

@frewsxcv

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Sep 10, 2017

Copy link
Copy Markdown
Collaborator

📌 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
@bors
bors merged commit c430fa8 into rust-lang:masterSep 10, 2017
@toidiu
toidiu deleted the ak-44382 branch September 29, 2017 04:23
Sign up for freeto 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

@toidiu@rust-highfive@frewsxcv@bors@aturon