diff options
| author | Corey Farwell <coreyf@rwell.org> | 2016-07-07 21:37:31 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2016-07-07 22:58:47 -0400 |
| commit | fc2123a69a3232f08123ce80c8203009ed5c5a6e (patch) | |
| tree | e97a48c1ea407ce17b0f10feda3f610fd8fcd980 /src/libstd | |
| parent | 2ad5ed07f8f3e7d5c84be2d2df747fbd90f70d68 (diff) | |
| download | rust-fc2123a69a3232f08123ce80c8203009ed5c5a6e.tar.gz rust-fc2123a69a3232f08123ce80c8203009ed5c5a6e.zip | |
Remove unnecessarily mutable reference in doc example.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 07f43f72ff5..c8b52fc0467 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -152,8 +152,8 @@ pub struct Sink { _priv: () } /// ```rust /// use std::io::{self, Write}; /// -/// let mut buffer = vec![1, 2, 3, 5, 8]; -/// let num_bytes = io::sink().write(&mut buffer).unwrap(); +/// let buffer = vec![1, 2, 3, 5, 8]; +/// let num_bytes = io::sink().write(&buffer).unwrap(); /// assert_eq!(num_bytes, 5); /// ``` #[stable(feature = "rust1", since = "1.0.0")] |
