mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-23 22:14:15 +00:00
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:
commit
075e16b261
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user