diff options
| author | Fenrir <[email protected]> | 2018-04-14 20:02:05 -0600 |
|---|---|---|
| committer | Fenrir <[email protected]> | 2018-04-21 16:35:01 -0600 |
| commit | b330206f5590d88a2f995321d2ea847ded951d1d (patch) | |
| tree | 4fecd0ca00b754c494e96b13e9837db48de93109 /ctr-std/src/io/util.rs | |
| parent | Move more implementation details to `imp` module (diff) | |
| download | archived-ctru-rs-b330206f5590d88a2f995321d2ea847ded951d1d.tar.xz archived-ctru-rs-b330206f5590d88a2f995321d2ea847ded951d1d.zip | |
Update for Rust nightly 2018-04-19
Diffstat (limited to 'ctr-std/src/io/util.rs')
| -rw-r--r-- | ctr-std/src/io/util.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ctr-std/src/io/util.rs b/ctr-std/src/io/util.rs index 45d281e..195310a 100644 --- a/ctr-std/src/io/util.rs +++ b/ctr-std/src/io/util.rs @@ -34,16 +34,15 @@ use mem; /// ``` /// use std::io; /// -/// # fn foo() -> io::Result<()> { -/// let mut reader: &[u8] = b"hello"; -/// let mut writer: Vec<u8> = vec![]; +/// fn main() -> io::Result<()> { +/// let mut reader: &[u8] = b"hello"; +/// let mut writer: Vec<u8> = vec![]; /// -/// io::copy(&mut reader, &mut writer)?; +/// io::copy(&mut reader, &mut writer)?; /// -/// assert_eq!(&b"hello"[..], &writer[..]); -/// # Ok(()) -/// # } -/// # foo().unwrap(); +/// assert_eq!(&b"hello"[..], &writer[..]); +/// Ok(()) +/// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<u64> |