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

Commit 5d60695

Browse files
Fixed clippy.
1 parent 32edabc commit 5d60695

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/io/avro/read/deserialize.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
3838
.collect::<Result<_>>()?;
3939

4040
// this is _the_ expensive transpose (rows -> columns)
41-
for row in (0..rows) {
41+
for _ in 0..rows {
4242
for (array, field) in arrays.iter_mut().zip(schema.fields().iter()) {
4343
if field.is_nullable() {
4444
// variant 0 is always the null in a union array
@@ -99,7 +99,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
9999
}
100100
}
101101
PhysicalType::Utf8 => {
102-
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|e| {
102+
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|_| {
103103
ArrowError::ExternalFormat(
104104
"Avro format contains a non-usize number of bytes".to_string(),
105105
)
@@ -114,7 +114,7 @@ pub fn deserialize(mut block: &[u8], rows: usize, schema: Arc<Schema>) -> Result
114114
array.push(Some(data))
115115
}
116116
PhysicalType::Binary => {
117-
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|e| {
117+
let len: usize = util::zigzag_i64(&mut block)?.try_into().map_err(|_| {
118118
ArrowError::ExternalFormat(
119119
"Avro format contains a non-usize number of bytes".to_string(),
120120
)

src/io/avro/read/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::io::Read;
22
use std::sync::Arc;
33

44
use avro_rs::Codec;
5-
use avro_rs::Reader as AvroReader;
65
use streaming_iterator::StreamingIterator;
76

87
mod deserialize;

src/io/parquet/read/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn page_iter_to_array<
206206

207207
Binary | Utf8 => binary::iter_to_array::<i32, _, _>(iter, metadata, &data_type),
208208
LargeBinary | LargeUtf8 => binary::iter_to_array::<i64, _, _>(iter, metadata, &data_type),
209-
FixedSizeBinary(size) => Ok(Box::new(fixed_size_binary::iter_to_array(
209+
FixedSizeBinary(_) => Ok(Box::new(fixed_size_binary::iter_to_array(
210210
iter, data_type, metadata,
211211
)?)),
212212

@@ -320,7 +320,7 @@ pub async fn page_stream_to_array<I: Stream<Item = std::result::Result<DataPage,
320320
LargeBinary | LargeUtf8 => {
321321
binary::stream_to_array::<i64, _, _>(pages, metadata, &data_type).await
322322
}
323-
FixedSizeBinary(size) => Ok(Box::new(
323+
FixedSizeBinary(_) => Ok(Box::new(
324324
fixed_size_binary::stream_to_array(pages, data_type, metadata).await?,
325325
)),
326326
other => Err(ArrowError::NotYetImplemented(format!(

tests/it/array/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ mod utf8;
1313

1414
use arrow2::array::{clone, new_empty_array, new_null_array, Array, PrimitiveArray};
1515
use arrow2::bitmap::Bitmap;
16-
use arrow2::datatypes::PhysicalType::Primitive;
1716
use arrow2::datatypes::{DataType, Field};
1817

1918
#[test]

0 commit comments

Comments
 (0)