Skip to content

Commit 29f62c6

Browse files
foskey51logan-keede
authored andcommitted
chore: enforce clippy lint needless_pass_by_value to datafusion-functions-aggregate-common (apache#18741)
## Which issue does this PR close? - Part of apache#18503 ## What changes are included in this PR? enforce clippy lint ` needless_pass_by_value` to `datafusion-functions-aggregate-common` ## Are these changes tested? yes ## Are there any user-facing changes? no
1 parent 9ac36fd commit 29f62c6

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎datafusion/functions-aggregate-common/src/lib.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
// Make sure fast / cheap clones on Arc are explicit:
3131
// https://github.com/apache/datafusion/issues/11143
3232
#![deny(clippy::clone_on_ref_ptr)]
33+
// https://github.com/apache/datafusion/issues/18503
34+
#![deny(clippy::needless_pass_by_value)]
35+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
3336

3437
pub mod accumulator;
3538
pub mod aggregate;

‎datafusion/functions-aggregate-common/src/tdigest.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ impl TDigest {
163163
}
164164
}
165165

166+
#[expect(clippy::needless_pass_by_value)]
166167
pub fn new_with_centroid(max_size: usize, centroid: Centroid) -> Self {
167168
TDigest {
168169
centroids: vec![centroid.clone()],

0 commit comments

Comments
 (0)