From c9099ff11b1d44a4942f448750cafe8e5c2fd915 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 20 Sep 2017 01:25:47 -0400 Subject: [PATCH] fix an incorrect assertion in the doc example for `std::io::copy` --- src/libstd/io/util.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 88f4214296d9c..bff4e5caaa16f 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(reader: &mut R, writer: &mut W) -> io::Result