diff --git a/src/buffer.rs b/src/buffer.rs index 09d8721..3737498 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -85,7 +85,7 @@ impl BufferWindow { // No buffer means we are reading from a slice and there is nothing more // to fill if self.buf.len() == 0 { - return Ok(0) + return Ok(0); } // Copy over the unconsumed bytes to the start of the buffer diff --git a/src/errors.rs b/src/errors.rs index fd4f00b..3fd5356 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -152,7 +152,7 @@ impl From for Error { let pos = value.position(); match value.into_kind() { crate::binary::ReaderErrorKind::Read(x) => Error::new(ErrorKind::Io(x)), - crate::binary::ReaderErrorKind::BufferFull => todo!(), + crate::binary::ReaderErrorKind::BufferFull => Error::new(ErrorKind::BufferFull), crate::binary::ReaderErrorKind::Lexer(LexError::Eof) => Error::eof(), crate::binary::ReaderErrorKind::Lexer(LexError::InvalidRgb) => { Error::invalid_syntax("invalid rgb", pos) @@ -165,7 +165,7 @@ impl From for Error { fn from(value: TextReaderError) -> Self { match value.into_kind() { crate::text::ReaderErrorKind::Read(x) => Error::new(ErrorKind::Io(x)), - crate::text::ReaderErrorKind::BufferFull => todo!(), + crate::text::ReaderErrorKind::BufferFull => Error::new(ErrorKind::BufferFull), crate::text::ReaderErrorKind::Eof => Error::eof(), } }