fix: silence clippy warnings denied as errors in CI #8
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/clippy-warnings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The check workflow runs
cargo clippy --workspace --all-targets -- --deny warnings, so any new lint promotes to a failure. This pass clears the six lints that fired againstmainand an unrelated arity mismatch in the handshake integration test that surfaced once clippy got past the lib build.#.Per usage bitmap:from 5 spaces to 3, and drop aString -> String.into()on aWsMessage::Textpayload.len()with anis_empty()soclippy::len_without_is_emptyis satisfied.is_some() { ... unwrap() }pattern asif let Some(..).tmp.path()as the newdata_dirargument tonet::run_connection, matching the signature it now has onmain.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
The check workflow runs `cargo clippy --workspace --all-targets -- --deny warnings`, so any new lint promotes to a failure. This pass clears the six lints that fired against `main` and an unrelated arity mismatch in the handshake integration test that surfaced once clippy got past the lib build. - core.rs: drop the inner `#![cfg(feature = "meshcore")]` (the parent module is already feature-gated in lib.rs, so the duplicate is what triggered `clippy::duplicated_attributes`). - host/tunnel.rs: dedent the doc list under `Per usage bitmap:` from 5 spaces to 3, and drop a `String -> String` `.into()` on a `WsMessage::Text` payload. - host/tcpforward.rs and host/wsproxy.rs: pair each test-only `len()` with an `is_empty()` so `clippy::len_without_is_empty` is satisfied. - host/timestatus.rs: rewrite the test-only `is_some() { ... unwrap() }` pattern as `if let Some(..)`. - tests/handshake.rs: pass `tmp.path()` as the new `data_dir` argument to `net::run_connection`, matching the signature it now has on `main`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>