diff --git a/delorean_parquet/src/lib.rs b/delorean_parquet/src/lib.rs index 99632d3ecb..ed683b8fbd 100644 --- a/delorean_parquet/src/lib.rs +++ b/delorean_parquet/src/lib.rs @@ -2,7 +2,7 @@ #![deny(rust_2018_idioms)] #![warn(missing_debug_implementations, clippy::explicit_iter_loop)] -// Export the parts of +// Export the parts of the parquet crate that are needed to interact with code in this crate pub use parquet::{ errors::ParquetError, file::reader::{Length, TryClone}, diff --git a/src/commands/input.rs b/src/commands/input.rs index 1dc6fc5611..83be5f25ce 100644 --- a/src/commands/input.rs +++ b/src/commands/input.rs @@ -83,6 +83,17 @@ impl Seek for InputReader { } } +impl Read for InputReader { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match self { + InputReader::FileInputType(file_input_reader) => file_input_reader.reader.read(buf), + InputReader::MemoryInputType(memory_input_reader) => { + memory_input_reader.cursor.read(buf) + } + } + } +} + impl delorean_parquet::Length for InputReader { fn len(&self) -> u64 { match self { @@ -117,17 +128,6 @@ impl BufRead for InputReader { } } -impl Read for InputReader { - fn read(&mut self, buf: &mut [u8]) -> Result { - match self { - InputReader::FileInputType(file_input_reader) => file_input_reader.reader.read(buf), - InputReader::MemoryInputType(memory_input_reader) => { - memory_input_reader.cursor.read(buf) - } - } - } -} - impl InputReader { pub fn file_type(&self) -> &FileType { match self {