Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Fixed clippy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Sep 16, 2021
1 parent 32edabc commit 5d60695
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/io/avro/read/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
.collect::<Result<_>>()?;

// this is _the_ expensive transpose (rows -> columns)
for row in (0..rows) {
for _ in 0..rows {
for (array, field) in arrays.iter_mut().zip(schema.fields().iter()) {
if field.is_nullable() {
// variant 0 is always the null in a union array
Expand Down Expand Up @@ -99,7 +99,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
}
}
PhysicalType::Utf8 => {
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|e| {
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|_| {
ArrowError::ExternalFormat(
"Avro format contains a non-usize number of bytes".to_string(),
)
Expand All @@ -114,7 +114,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
array.push(Some(data))
}
PhysicalType::Binary => {
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|e| {
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|_| {
ArrowError::ExternalFormat(
"Avro format contains a non-usize number of bytes".to_string(),
)
Expand Down
1 change: 0 additions & 1 deletion src/io/avro/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::io::Read;
use std::sync::Arc;

use avro_rs::Codec;
use avro_rs::Reader as AvroReader;
use streaming_iterator::StreamingIterator;

mod deserialize;
Expand Down
4 changes: 2 additions & 2 deletions src/io/parquet/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub fn page_iter_to_array<

Binary | Utf8 => binary::iter_to_array::<i32, _, _>(iter, metadata, &data_type),
LargeBinary | LargeUtf8 => binary::iter_to_array::<i64, _, _>(iter, metadata, &data_type),
FixedSizeBinary(size) => Ok(Box::new(fixed_size_binary::iter_to_array(
FixedSizeBinary(_) => Ok(Box::new(fixed_size_binary::iter_to_array(
iter, data_type, metadata,
)?)),

Expand Down Expand Up @@ -320,7 +320,7 @@ pub async fn page_stream_to_array<I: Stream<Item = std::result::Result<DataPage,
LargeBinary | LargeUtf8 => {
binary::stream_to_array::<i64, _, _>(pages, metadata, &data_type).await
}
FixedSizeBinary(size) => Ok(Box::new(
FixedSizeBinary(_) => Ok(Box::new(
fixed_size_binary::stream_to_array(pages, data_type, metadata).await?,
)),
other => Err(ArrowError::NotYetImplemented(format!(
Expand Down
1 change: 0 additions & 1 deletion tests/it/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod utf8;

use arrow2::array::{clone, new_empty_array, new_null_array, Array, PrimitiveArray};
use arrow2::bitmap::Bitmap;
use arrow2::datatypes::PhysicalType::Primitive;
use arrow2::datatypes::{DataType, Field};

#[test]
Expand Down

0 comments on commit 5d60695

Please sign in to comment.