Skip to content

Conversation

frewsxcv
Copy link
Contributor

@frewsxcv frewsxcv commented Jul 8, 2016

No description provided.

@@ -155,6 +155,7 @@ pub struct Sink { _priv: () }
/// let mut buffer = vec![1, 2, 3, 5, 8];
/// let num_bytes = io::sink().write(&mut buffer).unwrap();
/// assert_eq!(num_bytes, 5);
/// assert_eq!(buffer, &[1, 2, 3, 5, 8]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe instead of this, just change the example so it doesn't mutably borrow the buffer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely a good idea. Just made that change.

@frewsxcv frewsxcv changed the title Indicate that std::io::sink does not affect the data. Remove unnecessarily mutable reference in doc example. Jul 8, 2016
@apasel422
Copy link
Contributor

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 8, 2016

📌 Commit fc2123a has been approved by apasel422

@bors
Copy link
Collaborator

bors commented Jul 9, 2016

⌛ Testing commit fc2123a with merge d40c593...

bors added a commit that referenced this pull request Jul 9, 2016
Remove unnecessarily mutable reference in doc example.

None
@bors bors merged commit fc2123a into rust-lang:master Jul 9, 2016
@frewsxcv frewsxcv deleted the sink branch October 2, 2016 23:06
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.

4 participants