Skip to content

Commit fc2123a

Browse files
committed
Remove unnecessarily mutable reference in doc example.
1 parent 2ad5ed0 commit fc2123a

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)