fix(clippy): clear remaining -D warnings lints in zeno-agent #7

Merged
HexC0d3rz merged 2 commits from fix/ci-clippy-zeno-agent-followup into main 2026-06-17 10:56:46 -04:00
HexC0d3rz commented 2026-06-16 18:35:52 -04:00 (Migrated from github.com)

Summary

Follow-up to #6 (the combined crashlog/dead-code PR). #6 was blocked by 14 pre-existing clippy errors in zeno-agent that exist on main and have been failing CI for a while. This PR resolves them with mechanical fixes — no refactors, no API changes.

Background

The 14 errors only appear on the Windows CI bin build because the #[cfg(target_os = "windows")] arms of zeno-agent are exercised on the runner. On the Linux dev box some are hidden by cfg-gating; on Windows they show up. The earlier e468c64 "resolve 103 clippy errors" commit cleared most of them but left these 14.

Errors fixed

Lint Location Fix
manual_clamp relay.rs:130,131 .min().max().clamp()
needless_update webrtc/mod.rs:72 Drop redundant ..Default::default()
needless_return update.rs:190 Drop return (last expression)
missing_const_for_thread_local platform/windows.rs:1096 Use const { Cell::new(false) } initializer
unused_imports (test) run.rs:990 Remove use anyhow::Context; from test module
unused_imports (re-export) service.rs:267 #[allow(unused_imports)] on the pub use (no in-crate callers)
dead_code × 6 codec.rs:115, platform/mod.rs:46, main.rs:302, update.rs:17, remote_helper.rs:46,60,96 #[allow(dead_code)] on Windows-only / future-use items
too_many_arguments × 4 relay.rs:33 (8/7), remote_helper.rs:887 (8/7), run.rs:248 (9/7), wcstream.rs:35 (8/7) #[allow(clippy::too_many_arguments)] — refactor to a config struct is a separate change

Local verification

  • cargo fmt --all -- --check → clean
  • cargo check -p zeno-agent → ok
  • cargo clippy --workspace --all-targets -- -D warnings → no zeno-agent errors remain

The only remaining errors on this Linux dev box are in zeno-installer and zeno-server bin targets — these are env-specific to Linux because both crates are Windows-only / the bin test build exposes public API as dead on Linux. The Windows CI does not see them (verified in the PR #6 clippy log: zeno-installer and zeno-server both compiled cleanly on the Windows runner).

Files

11 files, +17/-6 lines.

Depends on #6 (the crashlog + dead-code PR) being merged first; the cross-dependency was the original reason for #6.

## Summary Follow-up to #6 (the combined crashlog/dead-code PR). #6 was blocked by 14 pre-existing clippy errors in `zeno-agent` that exist on `main` and have been failing CI for a while. This PR resolves them with mechanical fixes — no refactors, no API changes. ## Background The 14 errors only appear on the Windows CI bin build because the `#[cfg(target_os = "windows")]` arms of `zeno-agent` are exercised on the runner. On the Linux dev box some are hidden by cfg-gating; on Windows they show up. The earlier `e468c64` "resolve 103 clippy errors" commit cleared most of them but left these 14. ## Errors fixed | Lint | Location | Fix | | --- | --- | --- | | `manual_clamp` | `relay.rs:130,131` | `.min().max()` → `.clamp()` | | `needless_update` | `webrtc/mod.rs:72` | Drop redundant `..Default::default()` | | `needless_return` | `update.rs:190` | Drop `return` (last expression) | | `missing_const_for_thread_local` | `platform/windows.rs:1096` | Use `const { Cell::new(false) }` initializer | | `unused_imports` (test) | `run.rs:990` | Remove `use anyhow::Context;` from test module | | `unused_imports` (re-export) | `service.rs:267` | `#[allow(unused_imports)]` on the `pub use` (no in-crate callers) | | `dead_code` × 6 | `codec.rs:115`, `platform/mod.rs:46`, `main.rs:302`, `update.rs:17`, `remote_helper.rs:46,60,96` | `#[allow(dead_code)]` on Windows-only / future-use items | | `too_many_arguments` × 4 | `relay.rs:33` (8/7), `remote_helper.rs:887` (8/7), `run.rs:248` (9/7), `wcstream.rs:35` (8/7) | `#[allow(clippy::too_many_arguments)]` — refactor to a config struct is a separate change | ## Local verification - `cargo fmt --all -- --check` → clean - `cargo check -p zeno-agent` → ok - `cargo clippy --workspace --all-targets -- -D warnings` → no `zeno-agent` errors remain The only remaining errors on this Linux dev box are in `zeno-installer` and `zeno-server` bin targets — these are env-specific to Linux because both crates are Windows-only / the `bin` test build exposes public API as dead on Linux. The Windows CI does not see them (verified in the PR #6 clippy log: zeno-installer and zeno-server both compiled cleanly on the Windows runner). ## Files 11 files, +17/-6 lines. Depends on #6 (the crashlog + dead-code PR) being merged first; the cross-dependency was the original reason for #6.
Sign in to join this conversation.
No description provided.