chore(rust): use same params for clippy as the CI + correct clippy warnings

This commit is contained in:
Edouard Vanbelle
2026-04-27 09:29:45 +02:00
parent 30fd3cc488
commit 3a315ae75d
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ Always run these before committing, in this order:
```bash ```bash
cargo fmt --all # Auto-format cargo fmt --all # Auto-format
cargo clippy -- -D warnings # Lint (must pass with zero warnings) cargo clippy --all-features --all-targets -- -D warnings # Lint (must pass with zero warnings)
``` ```
CI enforces both — commits that fail either check will not merge. CI enforces both — commits that fail either check will not merge.
+1 -1
View File
@@ -183,7 +183,7 @@ Integration docs: [OIDC setup](docs/config/oidc.md) · [OIDC architecture](docs/
```bash ```bash
cargo fmt --all --check cargo fmt --all --check
cargo clippy -- -D warnings cargo clippy --all-features --all-targets -- -D warnings
cargo test --workspace cargo test --workspace
``` ```
+2 -2
View File
@@ -31,11 +31,11 @@ fmt-check:
cargo fmt --all --check cargo fmt --all --check
lint: lint:
cargo clippy -- -D warnings cargo clippy --all-features --all-targets -- -D warnings
check: check:
cargo fmt --all cargo fmt --all
cargo clippy -- -D warnings cargo clippy --all-features --all-targets -- -D warnings
openapi: openapi:
cargo run --bin generate-openapi cargo run --bin generate-openapi
+2 -2
View File
@@ -1517,7 +1517,7 @@ mod tests {
let is_last = i == chunks.len() - 1; let is_last = i == chunks.len() - 1;
if !is_last { if !is_last {
assert!( assert!(
chunk.length >= CDC_MIN_CHUNK as usize, chunk.length >= CDC_MIN_CHUNK,
"non-last chunk {} too small: {} < {}", "non-last chunk {} too small: {} < {}",
i, i,
chunk.length, chunk.length,
@@ -1525,7 +1525,7 @@ mod tests {
); );
} }
assert!( assert!(
chunk.length <= CDC_MAX_CHUNK as usize, chunk.length <= CDC_MAX_CHUNK,
"chunk {} too large: {} > {}", "chunk {} too large: {} > {}",
i, i,
chunk.length, chunk.length,