Skip to content

Commit d40c593

Browse files
authored
Auto merge of #34717 - frewsxcv:sink, r=apasel422
Remove unnecessarily mutable reference in doc example. None
2 parents 7323ac4 + fc2123a commit d40c593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/io/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ pub struct Sink { _priv: () }
152152
/// ```rust
153153
/// use std::io::{self, Write};
154154
///
155-
/// let mut buffer = vec![1, 2, 3, 5, 8];
156-
/// let num_bytes = io::sink().write(&mut buffer).unwrap();
155+
/// let buffer = vec![1, 2, 3, 5, 8];
156+
/// let num_bytes = io::sink().write(&buffer).unwrap();
157157
/// assert_eq!(num_bytes, 5);
158158
/// ```
159159
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)