Skip to content

Commit

Permalink
chore: sprinkle clippy-allow to get clippy passing
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 25, 2024
1 parent ffd216d commit f07fecf
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions arrow-data/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ mod tests {
// More tests located in top-level arrow crate

#[test]
#[allow(unused_must_use)]
fn null_array_n_buffers() {
let data = ArrayData::new_null(&DataType::Null, 10);

Expand Down
3 changes: 3 additions & 0 deletions arrow-ipc/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,7 @@ mod tests {
}

#[test]
#[allow(clippy::needless_borrows_for_generic_args)]
fn test_decimal128_alignment16_is_sufficient() {
const IPC_ALIGNMENT: usize = 16;

Expand Down Expand Up @@ -2618,6 +2619,7 @@ mod tests {
}

#[test]
#[allow(clippy::needless_borrows_for_generic_args)]
fn test_decimal128_alignment8_is_unaligned() {
const IPC_ALIGNMENT: usize = 8;

Expand Down Expand Up @@ -2675,6 +2677,7 @@ mod tests {
}

#[test]
#[allow(clippy::needless_borrows_for_generic_args)]
fn test_flush() {
// We write a schema which is small enough to fit into a buffer and not get flushed,
// and then force the write with .flush().
Expand Down
1 change: 1 addition & 0 deletions arrow-ord/src/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ fn sort_fixed_size_list(
Ok(sort_impl(options, &mut valids, &null_indices, limit, Ord::cmp).into())
}

#[allow(clippy::needless_maybe_sized)]
#[inline(never)]
fn sort_impl<T: ?Sized + Copy>(
options: SortOptions,
Expand Down
1 change: 1 addition & 0 deletions arrow-schema/src/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ impl UnionFields {
{
let fields = fields.into_iter().map(Into::into);
let mut set = 0_u128;
#[allow(clippy::manual_inspect)]
type_ids
.into_iter()
.map(|idx| {
Expand Down
2 changes: 2 additions & 0 deletions parquet/src/arrow/arrow_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3034,6 +3034,7 @@ mod tests {
}

#[test]
#[allow(clippy::byte_char_slices)]
fn test_disabled_statistics_with_page() {
let file_schema = Schema::new(vec![
Field::new("a", DataType::Utf8, true),
Expand Down Expand Up @@ -3106,6 +3107,7 @@ mod tests {
}

#[test]
#[allow(clippy::byte_char_slices)]
fn test_disabled_statistics_with_chunk() {
let file_schema = Schema::new(vec![
Field::new("a", DataType::Utf8, true),
Expand Down
1 change: 1 addition & 0 deletions parquet/src/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@ mod tests {
}

#[test]
#[allow(clippy::byte_char_slices)]
fn test_byte_array_from() {
assert_eq!(
ByteArray::from(vec![b'A', b'B', b'C']).data(),
Expand Down
2 changes: 2 additions & 0 deletions parquet/src/file/metadata/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
// write offset index to the file
for (row_group_idx, row_group) in self.row_groups.iter_mut().enumerate() {
for (column_idx, column_metadata) in row_group.columns.iter_mut().enumerate() {
#[allow(clippy::single_match)]
match &offset_indexes[row_group_idx][column_idx] {
Some(offset_index) => {
let start_offset = self.buf.bytes_written();
Expand Down Expand Up @@ -84,6 +85,7 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
// write column index to the file
for (row_group_idx, row_group) in self.row_groups.iter_mut().enumerate() {
for (column_idx, column_metadata) in row_group.columns.iter_mut().enumerate() {
#[allow(clippy::single_match)]
match &column_indexes[row_group_idx][column_idx] {
Some(column_index) => {
let start_offset = self.buf.bytes_written();
Expand Down
1 change: 1 addition & 0 deletions parquet/src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ impl<'a> PrimitiveTypeBuilder<'a> {
));
}

#[allow(clippy::single_match)]
match &self.logical_type {
Some(logical_type) => {
// If a converted type is populated, check that it is consistent with
Expand Down

0 comments on commit f07fecf

Please sign in to comment.