From cf92d98671b678c3f815a1acf6f4ad313f7d1ddb Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Tue, 23 Apr 2019 13:29:31 -0400 Subject: [PATCH] Fix compiler warnings --- src/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ff8341a..00a6287 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,7 @@ impl<'a> KStruct<'a> for KStructUnit<'a> { Ok(KStructUnit { phantom: PhantomData }) } - fn read(&mut self, stream: &mut S) -> Result<(), KError<'a>> { + fn read(&mut self, _stream: &mut S) -> Result<(), KError<'a>> { Ok(()) } } @@ -125,6 +125,7 @@ pub trait KStream { } } +#[allow(dead_code)] struct BytesReader<'a> { bytes: &'a [u8], pos: usize, @@ -151,7 +152,7 @@ impl<'a> KStream for BytesReader<'a> { unimplemented!() } - fn seek(&mut self, position: u64) -> io::Result<()> { + fn seek(&mut self, _position: u64) -> io::Result<()> { unimplemented!() } @@ -239,11 +240,11 @@ impl<'a> KStream for BytesReader<'a> { unimplemented!() } - fn read_bits_int(&mut self, n: u32) -> io::Result { + fn read_bits_int(&mut self, _n: u32) -> io::Result { unimplemented!() } - fn read_bytes(&mut self, len: usize) -> io::Result<&[u8]> { + fn read_bytes(&mut self, _len: usize) -> io::Result<&[u8]> { unimplemented!() } @@ -253,10 +254,10 @@ impl<'a> KStream for BytesReader<'a> { fn read_bytes_term( &mut self, - term: char, - include: bool, - consume: bool, - eos_error: bool, + _term: char, + _include: bool, + _consume: bool, + _eos_error: bool, ) -> io::Result<&[u8]> { unimplemented!() }