about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/util.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs
index e20f249d3ea..45d281ee34a 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>