From: Kostya Shishkov Date: Sat, 6 May 2017 11:44:14 +0000 (+0200) Subject: byteio doesn't need offset on read_skip() X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=6b167b0cdd9acdfa59034ab9abcc27bddad38418;p=nihav.git byteio doesn't need offset on read_skip() --- diff --git a/src/io/byteio.rs b/src/io/byteio.rs index 19d2ca5..3a9adac 100644 --- a/src/io/byteio.rs +++ b/src/io/byteio.rs @@ -103,7 +103,7 @@ impl<'a> ByteReader<'a> { read_int!(self, u64, 8, to_le) } - pub fn read_skip(&mut self, len: usize) -> ByteIOResult { + pub fn read_skip(&mut self, len: usize) -> ByteIOResult<()> { if self.io.is_seekable() { self.io.seek(SeekFrom::Current(len as i64))?; } else { @@ -119,7 +119,7 @@ impl<'a> ByteReader<'a> { ssize = ssize - 1; } } - Ok(self.tell()) + Ok(()) } pub fn tell(&mut self) -> u64 {