Skip to content

Commit c3d2c65

Browse files
committed
fix(rules): simplify the single-argument aggregate test for clippy
1 parent e0bcf81 commit c3d2c65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • crates/sqlclean/src/sql_quality/_helpers

‎crates/sqlclean/src/sql_quality/_helpers/safety.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,8 @@ fn is_aggregate_call(
670670
) -> bool {
671671
let normalized: String = normalized_name(&significant.tokens[name].text);
672672
aggregates.contains(&normalized)
673-
&& !(SINGLE_ARGUMENT_AGGREGATES.contains(&normalized.as_str())
674-
&& !significant.arguments_commas(name + 1, close).is_empty())
673+
&& (!SINGLE_ARGUMENT_AGGREGATES.contains(&normalized.as_str())
674+
|| significant.arguments_commas(name + 1, close).is_empty())
675675
}
676676

677677
/// Whether `index` ends the clause; only an ON condition ends at a comma, before the next relation.

0 commit comments

Comments
 (0)