Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Oct 4, 2024
1 parent 366346a commit dd0a32e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/magic_of_blanket_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand All @@ -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)
Expand Down

0 comments on commit dd0a32e

Please sign in to comment.