diff options
| author | bors <bors@rust-lang.org> | 2016-07-09 12:16:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-09 12:16:57 -0700 |
| commit | d40c593f42fafbac1ff3d827f6df96338b5b7d8b (patch) | |
| tree | 3196e576c04dd8d8a885dc3a6b5f538f905686a0 /src/libstd | |
| parent | 7323ac4add33363a4bdee910b70b09ee82fef7bb (diff) | |
| parent | fc2123a69a3232f08123ce80c8203009ed5c5a6e (diff) | |
| download | rust-d40c593f42fafbac1ff3d827f6df96338b5b7d8b.tar.gz rust-d40c593f42fafbac1ff3d827f6df96338b5b7d8b.zip | |
Auto merge of #34717 - frewsxcv:sink, r=apasel422
Remove unnecessarily mutable reference in doc example. None
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")] |
