From b06cb1b199b5ff65a131a2e27398d90ffa555a2e Mon Sep 17 00:00:00 2001 From: Avery Quinn Date: Wed, 29 Jul 2026 07:06:58 +0200 Subject: [PATCH] Enable allow_attributes lint for arrow-buffer --- arrow-buffer/src/bigint/mod.rs | 3 +-- arrow-buffer/src/buffer/immutable.rs | 2 +- arrow-buffer/src/lib.rs | 1 + arrow-buffer/src/util/bit_chunk_iterator.rs | 3 +-- arrow-buffer/src/util/bit_iterator.rs | 5 ++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arrow-buffer/src/bigint/mod.rs b/arrow-buffer/src/bigint/mod.rs index 6a4b41ee2993..495106e2d946 100644 --- a/arrow-buffer/src/bigint/mod.rs +++ b/arrow-buffer/src/bigint/mod.rs @@ -57,7 +57,6 @@ enum DivRemError { } /// A signed 256-bit integer -#[allow(non_camel_case_types)] #[derive(Copy, Clone, Default, Eq, PartialEq, Hash)] #[repr(C)] pub struct i256 { @@ -1752,7 +1751,7 @@ mod tests { } } - #[allow(clippy::op_ref)] + #[expect(clippy::op_ref)] fn test_reference_op(il: i256, ir: i256) { let r1 = il + ir; let r2 = &il + ir; diff --git a/arrow-buffer/src/buffer/immutable.rs b/arrow-buffer/src/buffer/immutable.rs index 9c7fc1a90169..398068b93f3f 100644 --- a/arrow-buffer/src/buffer/immutable.rs +++ b/arrow-buffer/src/buffer/immutable.rs @@ -767,7 +767,7 @@ mod tests { } #[test] - #[allow(clippy::float_cmp)] + #[expect(clippy::float_cmp)] fn test_as_typed_data() { check_as_typed_data!(&[1i8, 3i8, 6i8], i8); check_as_typed_data!(&[1u8, 3u8, 6u8], u8); diff --git a/arrow-buffer/src/lib.rs b/arrow-buffer/src/lib.rs index 230747b8b84a..8f76ed7cc621 100644 --- a/arrow-buffer/src/lib.rs +++ b/arrow-buffer/src/lib.rs @@ -37,6 +37,7 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_cfg))] +#![deny(clippy::allow_attributes)] #![warn(missing_docs)] pub mod alloc; diff --git a/arrow-buffer/src/util/bit_chunk_iterator.rs b/arrow-buffer/src/util/bit_chunk_iterator.rs index 6655c397ebbd..95ef82bd60e5 100644 --- a/arrow-buffer/src/util/bit_chunk_iterator.rs +++ b/arrow-buffer/src/util/bit_chunk_iterator.rs @@ -349,7 +349,7 @@ impl Iterator for BitChunkIterator<'_> { } // cast to *const u64 should be fine since we are using read_unaligned below - #[allow(clippy::cast_ptr_alignment)] + #[expect(clippy::cast_ptr_alignment)] let raw_data = self.buffer.as_ptr() as *const u64; // bit-packed buffers are stored starting with the least-significant byte first @@ -556,7 +556,6 @@ mod tests { } #[test] - #[allow(clippy::assertions_on_constants)] fn test_unaligned_bit_chunk_iterator() { let buffer = Buffer::from(&[0xFF; 5]); let unaligned = UnalignedBitChunk::new(buffer.as_slice(), 0, 40); diff --git a/arrow-buffer/src/util/bit_iterator.rs b/arrow-buffer/src/util/bit_iterator.rs index 335fe40f8f91..48a74734f6a1 100644 --- a/arrow-buffer/src/util/bit_iterator.rs +++ b/arrow-buffer/src/util/bit_iterator.rs @@ -931,9 +931,9 @@ mod tests { let mut actual = actual.clone(); let mut expected = expected.clone(); for _ in 0..expected.len() { - #[allow(clippy::iter_nth_zero)] + #[expect(clippy::iter_nth_zero)] let actual_val = actual.nth(0); - #[allow(clippy::iter_nth_zero)] + #[expect(clippy::iter_nth_zero)] let expected_val = expected.nth(0); assert_eq!(actual_val, expected_val, "Failed on nth(0)"); } @@ -971,7 +971,6 @@ mod tests { let mut actual = actual.clone(); let mut expected = expected.clone(); for _ in 0..expected.len() { - #[allow(clippy::iter_nth_zero)] let actual_val = actual.nth_back(0); let expected_val = expected.nth_back(0); assert_eq!(actual_val, expected_val, "Failed on nth_back(0)");