fix(rust): remediate clippy lint violations across all 14 Rust crates
@WilliamBerryiii is already working on this.
Since May 11, 2026.
- Dominant language
- HCL
- Stars
- 104
- Forks
- 48
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 24
Description
Summary
PR #231 introduced clippy lint configuration ([lints.clippy] in all 14 Cargo.toml files) and CI enforcement (cargo clippy -- -D warnings) across both GitHub Actions and Azure DevOps pipelines. The CI gates are now active, but any existing clippy violations in the codebase will block PR merges. This issue tracks running clippy locally across all 14 crates and fixing any violations found.
Background
Current Lint Configuration (all 14 crates):
[lints.clippy]
correctness = { level = "deny", priority = -1 }
suspicious = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
Three WASM crates (cdylib) additionally suppress missing_safety_doc = "allow".
CI Enforcement: cargo clippy -- -D warnings promotes all warn-level lints to errors. This means suspicious, complexity, style, and perf warnings all block builds.
Current Code State: No #[allow(clippy::...)] attributes exist anywhere in .rs source files, indicating either clean code or that violations have not yet been surfaced by CI.
Scope
14 Crates to Validate:
| Category | Crate Path |
|---|---|
| Services | src/500-application/501-rust-telemetry/services/sender/ |
| Services | src/500-application/501-rust-telemetry/services/receiver/ |
| Services | src/500-application/502-rust-http-connector/services/subscriber/ |
| Services | src/500-application/502-rust-http-connector/services/broker/ |
| Services | src/500-application/503-media-capture-service/services/media-capture-service/ |
| Services | src/500-application/504-mqtt-otel-trace-exporter/services/mqtt-otel-trace-exporter/ |
| Services | src/500-application/507-ai-inference/services/ai-edge-inference/ |
| Library | src/500-application/507-ai-inference/services/ai-edge-inference-crate/ |
| Test | src/500-application/507-ai-inference/services/ai-edge-inference-crate/tests/no-features-test/ |
| WASM | src/500-application/511-rust-embedded-wasm-provider/operators/map/ |
| WASM | src/500-application/511-rust-embedded-wasm-provider/operators/custom-provider/ |
| WASM | src/500-application/512-avro-to-json/operators/avro-to-json/ |
| CLI | src/900-tools-utilities/900-mqtt-tools/ |
| CLI | src/900-tools-utilities/901-video-tools/cli/video-to-gif/ |
Acceptance Criteria
-
cargo clippy -- -D warningspasses on all 11 standard crates -
cargo clippy --target wasm32-wasip2 -- -D warningspasses on all 3 WASM crates (cdylib) - Fixes address root causes — prefer code corrections over
#[allow(...)]suppressions - Where
#[allow(...)]is genuinely needed, include a justification comment - CI pipelines pass on both GitHub Actions and Azure DevOps
Implementation Guidance
Run clippy across all crates locally:
for cargo_toml in $(find src/ -name "Cargo.toml" -not -path "./Cargo.toml"); do
crate_dir=$(dirname "$cargo_toml")
if grep -q 'crate-type.*=.*\["cdylib"\]' "$cargo_toml"; then
(cd "$crate_dir" && cargo clippy --target wasm32-wasip2 -- -D warnings)
else
(cd "$crate_dir" && cargo clippy -- -D warnings)
fi
done
Common clippy fixes by category:
- style:
needless_return,redundant_closure,match_bool— simplify idioms - complexity:
too_many_arguments,type_complexity— extract helpers or type aliases - perf:
needless_collect,large_enum_variant— optimize allocations - suspicious:
suspicious_else_formatting,suspicious_op_assign_impl— clarify intent
Blocked by: #169 (clippy config + CI) — now merged via PR #231
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.