fix: cleanup comment + code order
parent
b22423621b
commit
2c4a9dba53
|
@ -2,7 +2,7 @@
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms)]
|
||||||
#![warn(missing_debug_implementations, clippy::explicit_iter_loop)]
|
#![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::{
|
pub use parquet::{
|
||||||
errors::ParquetError,
|
errors::ParquetError,
|
||||||
file::reader::{Length, TryClone},
|
file::reader::{Length, TryClone},
|
||||||
|
|
|
@ -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 {
|
impl delorean_parquet::Length for InputReader {
|
||||||
fn len(&self) -> u64 {
|
fn len(&self) -> u64 {
|
||||||
match self {
|
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 {
|
impl InputReader {
|
||||||
pub fn file_type(&self) -> &FileType {
|
pub fn file_type(&self) -> &FileType {
|
||||||
match self {
|
match self {
|
||||||
|
|
Loading…
Reference in New Issue