Skip to content

Commit f80b83c

Browse files
chore: deny clippy::inline_always at the workspace level (#9726)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent b8154fd commit f80b83c

37 files changed

Lines changed: 92 additions & 0 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ get_unwrap = "deny"
380380
host_endian_bytes = "deny"
381381
if_then_some_else_none = "deny"
382382
inconsistent_struct_constructor = "deny"
383+
inline_always = "deny"
383384
manual_assert = "deny"
384385
manual_is_variant_and = "deny"
385386
many_single_char_names = "deny"

‎encodings/fastlanes/src/bitpacking/array/unpack_iter.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub trait UnpackStrategy<T: PhysicalPType> {
3333
pub struct BitPackingStrategy;
3434

3535
impl<T: PhysicalPType<Physical: BitPacking>> UnpackStrategy<T> for BitPackingStrategy {
36+
#[allow(clippy::inline_always)]
3637
#[inline(always)]
3738
unsafe fn unpack_chunk(
3839
&self,
@@ -153,6 +154,7 @@ impl<'a, T: PhysicalPType, S: UnpackStrategy<T>> UnpackedChunks<'a, T, S> {
153154
})
154155
}
155156

157+
#[allow(clippy::inline_always)]
156158
#[inline(always)]
157159
const fn elems_per_chunk(&self) -> usize {
158160
128 * self.bit_width / size_of::<T>()

‎encodings/fastlanes/src/for/array/for_decompress.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct FoRStrategy<T> {
3535
}
3636

3737
impl<T: PhysicalPType<Physical = T> + FoR> UnpackStrategy<T> for FoRStrategy<T> {
38+
#[allow(clippy::inline_always)]
3839
#[inline(always)]
3940
unsafe fn unpack_chunk(
4041
&self,

‎encodings/runend/src/decompress_bool.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ pub fn runend_decode_typed_bool(
101101
/// Fast path for few runs with no offset. Uses direct slice access to minimize overhead.
102102
/// This avoids the `trimmed_ends_iter` iterator chain which adds significant overhead
103103
/// for small numbers of runs.
104+
#[allow(clippy::inline_always)]
104105
#[inline(always)]
105106
fn decode_few_runs_no_offset<E: vortex_array::dtype::IntegerPType>(
106107
ends: &[E],
@@ -220,6 +221,7 @@ fn decode_bool_nullable(
220221
}
221222

222223
/// Sequential decode for few runs - avoids prefill overhead.
224+
#[allow(clippy::inline_always)]
223225
#[inline(always)]
224226
fn decode_nullable_sequential(
225227
run_ends: impl Iterator<Item = usize>,

‎vortex-array/src/aggregate_fn/fns/sum/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ pub(crate) fn make_zero_state(return_dtype: &DType) -> SumState {
370370
}
371371

372372
/// Checked add for u64, returning true if overflow occurred.
373+
#[allow(clippy::inline_always)]
373374
#[inline(always)]
374375
fn checked_add_u64(acc: &mut u64, val: u64) -> bool {
375376
match acc.checked_add(val) {
@@ -382,6 +383,7 @@ fn checked_add_u64(acc: &mut u64, val: u64) -> bool {
382383
}
383384

384385
/// Checked add for i64, returning true if overflow occurred.
386+
#[allow(clippy::inline_always)]
385387
#[inline(always)]
386388
fn checked_add_i64(acc: &mut i64, val: i64) -> bool {
387389
match acc.checked_add(val) {

‎vortex-array/src/aggregate_fn/typed.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ pub(super) struct AggregateFnInner<V: AggregateFnVTable> {
6363
}
6464

6565
impl<V: AggregateFnVTable> DynAggregateFn for AggregateFnInner<V> {
66+
#[allow(clippy::inline_always)]
6667
#[inline(always)]
6768
fn as_any(&self) -> &dyn Any {
6869
self
6970
}
7071

72+
#[allow(clippy::inline_always)]
7173
#[inline(always)]
7274
fn id(&self) -> AggregateFnId {
7375
V::id(&self.vtable)

‎vortex-array/src/array/erased.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ impl ArrayRef {
8484
}
8585

8686
/// Returns a reference to the `dyn DynArrayData` inside the inner.
87+
#[allow(clippy::inline_always)]
8788
#[inline(always)]
8889
pub(crate) fn dyn_array(&self) -> &dyn DynArrayData {
8990
&self.0.data
9091
}
9192

9293
/// Returns a mutable reference to the inner if this is the sole owner.
94+
#[allow(clippy::inline_always)]
9395
#[inline(always)]
9496
pub(crate) fn inner_mut(&mut self) -> Option<&mut ArrayInner<dyn DynArrayData>> {
9597
Arc::get_mut(&mut self.0)
@@ -119,6 +121,7 @@ impl ArrayRef {
119121
///
120122
/// # Safety
121123
/// The caller must guarantee the concrete type behind `dyn DynArrayData` is `ArrayData<V>`.
124+
#[allow(clippy::inline_always)]
122125
#[inline(always)]
123126
pub(crate) unsafe fn downcast_inner_unchecked<V: VTable>(
124127
self,
@@ -791,6 +794,7 @@ impl ArrayRef {
791794
}
792795

793796
impl IntoArray for ArrayRef {
797+
#[allow(clippy::inline_always)]
794798
#[inline(always)]
795799
fn into_array(self) -> ArrayRef {
796800
self

‎vortex-array/src/array/typed.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ impl<V: VTable> Array<V> {
348348
}
349349

350350
/// Returns the internal [`ArrayRef`].
351+
#[allow(clippy::inline_always)]
351352
#[inline(always)]
352353
pub fn as_array(&self) -> &ArrayRef {
353354
&self.inner
@@ -361,6 +362,7 @@ impl<V: VTable> Array<V> {
361362
}
362363

363364
/// Downcast the inner `ArrayRef` to `&ArrayData<V>`.
365+
#[allow(clippy::inline_always)]
364366
#[inline(always)]
365367
fn downcast_inner(&self) -> &ArrayData<V> {
366368
let any = self.inner.dyn_array().as_any();
@@ -508,6 +510,7 @@ impl<V: VTable> AsRef<ArrayRef> for Array<V> {
508510
}
509511

510512
impl<V: VTable> IntoArray for Array<V> {
513+
#[allow(clippy::inline_always)]
511514
#[inline(always)]
512515
fn into_array(self) -> ArrayRef {
513516
self.inner

‎vortex-array/src/arrays/bool/compute/filter.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ fn filter_pext_fallback(src: &BitBuffer, mask_buf: &BitBuffer, true_count: usize
129129
/// Extracted so the same logic is shared between the software and hardware paths.
130130
/// Uses raw pointer writes instead of Vec::push to eliminate bounds checks
131131
/// in the hot loop — we know the exact output size from true_count.
132+
#[allow(clippy::inline_always)]
132133
#[inline(always)]
133134
#[allow(clippy::cast_possible_truncation)]
134135
fn filter_inner(
@@ -227,6 +228,7 @@ fn filter_inner(
227228
/// lookup table per mask byte. Each byte PEXT is a single table lookup with no
228229
/// data dependencies between bytes, making this faster than the parallel-prefix
229230
/// approach (~12ns vs ~18ns per word).
231+
#[allow(clippy::inline_always)]
230232
#[inline(always)]
231233
pub fn pext_fallback(src: u64, mask: u64) -> u64 {
232234
pext_byte_lut(src, mask)
@@ -268,6 +270,7 @@ static BYTE_PEXT_LUT: &[u8; 256 * 256] = &{
268270
};
269271

270272
/// Byte-level PEXT using precomputed lookup table.
273+
#[allow(clippy::inline_always)]
271274
#[inline(always)]
272275
fn pext_byte_lut(src: u64, mask: u64) -> u64 {
273276
let src_bytes = src.to_le_bytes();

‎vortex-array/src/arrays/filter/execute/simd_compress/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ const fn compress_lut<const ROWS: usize, const BYTES: usize>(
152152
/// The pointer contract of [`filter_slice_by_bitmap`] / [`filter_slice_mut_by_bitmap`] must hold,
153153
/// and `bits` must only select elements that are in bounds.
154154
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), not(miri)))]
155+
#[allow(clippy::inline_always)]
155156
#[inline(always)]
156157
unsafe fn compress_tail<const IN_PLACE: bool>(
157158
src: *const u8,
@@ -180,6 +181,7 @@ unsafe fn compress_tail<const IN_PLACE: bool>(
180181
/// must not overlap `src` and must have room at `write_pos`; in-place, forward compaction must
181182
/// guarantee `write_pos <= word_start`.
182183
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), not(miri)))]
184+
#[allow(clippy::inline_always)]
183185
#[inline(always)]
184186
unsafe fn bulk_copy<const IN_PLACE: bool>(
185187
src: *const u8,

0 commit comments

Comments
 (0)