]> git.nihav.org Git - nihav.git/commitdiff
byteio doesn't need offset on read_skip()
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 6 May 2017 11:44:14 +0000 (13:44 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 6 May 2017 11:44:14 +0000 (13:44 +0200)
src/io/byteio.rs

index 19d2ca58699a501e754685987424016620a9c538..3a9adac5f10c344baac89c50d31163c45bfc71fb 100644 (file)
@@ -103,7 +103,7 @@ impl<'a> ByteReader<'a> {
         read_int!(self, u64, 8, to_le)
     }
 
-    pub fn read_skip(&mut self, len: usize) -> ByteIOResult<u64> {
+    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 {