diff --git a/examples/magic_of_blanket_impl.rs b/examples/magic_of_blanket_impl.rs index 811a5378..3c98ab4b 100644 --- a/examples/magic_of_blanket_impl.rs +++ b/examples/magic_of_blanket_impl.rs @@ -22,6 +22,10 @@ fn main() { reader_seek.seek(SeekFrom::Start(0)).unwrap(); } +struct MyRead<R: Read> { + inner: R, +} + struct OnlyRead {} impl Read for OnlyRead { fn read(&mut self, _buf: &mut [u8]) -> io::Result<usize> { @@ -41,10 +45,6 @@ impl Seek for ReadSeek { } } -struct MyRead<R: Read> { - inner: R, -} - impl<R: Read> Read for MyRead<R> { fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.inner.read(buf)