fix: cleanup comment + code order

pull/24376/head
alamb 2020-06-23 17:21:20 -04:00
parent b22423621b
commit 2c4a9dba53
2 changed files with 12 additions and 12 deletions

View File

@ -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},

View File

@ -83,6 +83,17 @@ impl Seek for InputReader {
}
}
impl Read for InputReader {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
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<usize, std::io::Error> {
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 {