Skip to content

Commit 18340f5

Browse files
bordeuxclaude
andcommitted
fix: add clippy allow attributes for stable Rust compatibility
Add #[allow(...)] attributes to suppress clippy suggestions for unstable features (let-chains, is_multiple_of) that would break Docker builds using stable Rust. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 391b9e6 commit 18340f5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/functions/array.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ pub fn array_group_by_fn(kwargs: Kwargs) -> Result<Value, Error> {
327327
})?;
328328

329329
// Get the key value as string
330+
// Note: Using nested if-let instead of let-chains for stable Rust compatibility
331+
#[allow(clippy::collapsible_if)]
330332
if let Some(obj) = json_value.as_object() {
331333
if let Some(key_val) = obj.get(&key) {
332334
let group_key = match key_val {

src/functions/statistics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ pub fn array_median_fn(kwargs: Kwargs) -> Result<Value, Error> {
201201
numbers.sort_by(|a, b| a.partial_cmp(b).unwrap());
202202

203203
let len = numbers.len();
204+
// Note: Using modulo instead of is_multiple_of() for stable Rust compatibility
205+
#[allow(clippy::manual_is_multiple_of)]
204206
let median = if len % 2 == 0 {
205207
// Even length: average of two middle values
206208
(numbers[len / 2 - 1] + numbers[len / 2]) / 2.0

0 commit comments

Comments
 (0)