Rollup merge of #44712 - oconnor663:copy_test, r=GuillaumeGomez

fix an incorrect assertion in the doc example for `std::io::copy`

I think this wasn't caught by CI because the `foo` wrapper function was only defined and not called. This seems to be the norm for doc examples that define a `foo` function. Is that on purpose?
This commit is contained in:
Corey Farwell 2017-09-23 00:29:13 -04:00 committed by GitHub
commit 075e16b261

View File

@ -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>