diff options
| author | Jack O'Connor <oconnor663@gmail.com> | 2017-09-20 01:25:47 -0400 |
|---|---|---|
| committer | Jack O'Connor <oconnor663@gmail.com> | 2017-09-20 01:25:47 -0400 |
| commit | c9099ff11b1d44a4942f448750cafe8e5c2fd915 (patch) | |
| tree | df014a7393424920e79c567e2e03e769ee4d7f28 /src/libstd | |
| parent | f60bc3ac0c20f7b3ab85df1e5e2e3217a7a95630 (diff) | |
| download | rust-c9099ff11b1d44a4942f448750cafe8e5c2fd915.tar.gz rust-c9099ff11b1d44a4942f448750cafe8e5c2fd915.zip | |
fix an incorrect assertion in the doc example for `std::io::copy`
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/util.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 88f4214296d..bff4e5caaa1 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -40,9 +40,10 @@ use mem; /// /// io::copy(&mut reader, &mut writer)?; /// -/// assert_eq!(reader, &writer[..]); +/// assert_eq!(&b"hello"[..], &writer[..]); /// # Ok(()) /// # } +/// # foo().unwrap(); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<u64> |
