Created
February 4, 2014 02:20
-
-
Save DaGenix/8796382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct ReaderRef<'a, R> { | |
priv reader: &'a mut R | |
} | |
impl <'a, R: Reader> ReaderRef<'a, R> { | |
pub fn new<'a>(reader: &'a mut R) -> ReaderRef<'a, R> { | |
ReaderRef { | |
reader: reader | |
} | |
} | |
} | |
impl <'a, R: Reader> Reader for ReaderWrapper<'a, R> { | |
fn read(&mut self, out: &mut [u8]) -> Option<uint> { | |
self.r.read(out) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment