X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=src%2Fio%2Fbyteio.rs;h=e172a325d223e19ff512a6f553b9c4aa083293f1;hb=b7b96b4cabbde72f05d0464299bf7fdf74d6480c;hp=f4816931be11253e1b750c78d1fa85620bf7fb35;hpb=296d86b2833e4e2ab62d425ece2ea0f0f8ce4b77;p=nihav.git diff --git a/src/io/byteio.rs b/src/io/byteio.rs index f481693..e172a32 100644 --- a/src/io/byteio.rs +++ b/src/io/byteio.rs @@ -166,7 +166,7 @@ impl<'a> ByteReader<'a> { } else { let mut ssize = len; let mut buf : [u8; 16] = [0; 16]; - let mut bref = &mut buf; + let bref = &mut buf; while ssize > bref.len() { self.io.read_buf(bref)?; ssize -= bref.len(); @@ -370,8 +370,8 @@ pub struct MemoryWriter<'a> { pos: usize, } -pub struct FileWriter<'a> { - file: &'a File, +pub struct FileWriter { + file: File, } impl<'a> ByteWriter<'a> { @@ -519,13 +519,13 @@ impl<'a> ByteIO for MemoryWriter<'a> { } } -impl<'a> FileWriter<'a> { - pub fn new_write(file: &'a mut File) -> Self { +impl FileWriter { + pub fn new_write(file: File) -> Self { FileWriter { file: file } } } -impl<'a> ByteIO for FileWriter<'a> { +impl ByteIO for FileWriter { #[allow(unused_variables)] fn read_byte(&mut self) -> ByteIOResult { Err(ByteIOError::NotImplemented)