Repository navigation
chore(rust): clear all clippy warnings - #386
Open
sunxiaobin89 wants to merge 1 commit into
Open
sunxiaobin89 wants to merge 1 commit into
sunxiaobin89 wants to merge 1 commit into
Conversation
cargo clippy reported 54 warnings on main. Auto-fix handled 31 machine- applicable ones (needless borrows, manual div_ceil, derivable Default, needless trim/get(0)); the rest needed judgement: - drop dead code: TailLogRequest, SshSession, the unused RDP wheel constants, and three NativeRenderer helpers with no callers - scope test-only helpers/imports with #[cfg(test)] (generate_fake_cookie, mpsc in connection_manager, PathBuf in os_keypath) instead of deleting them - type aliases for the two remaining complex types (DesktopConnection, StreamProgressCallback) - allow(clippy::too_many_arguments) where a context struct would obscure a hot path, and allow(clippy::result_large_err) where tungstenite's callback forces its own ErrorResponse type No behavior change: cargo test --lib is 543 passed, and the debug binary still builds. rustfmt was deliberately not run because main already has pre-existing formatting drift; this keeps the diff reviewable.
sunxiaobin89
force-pushed
the
chore/clippy-cleanup
branch
from
December 3, 2026 05:34
cf417cf to
c1962ef
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo clippyreported 54 warnings on main. This clears all of them without changing behavior.Auto-fixed (31): needless borrows (19, mostly returned references in
lib.rs), manualdiv_ceil, derivableDefaultforX11Config,trim()beforesplit_whitespace,get(0)→first(), unused imports.Manual (23):
TailLogRequest,SshSession, unused RDP wheel constants, andNativeRenderer::{size, remote_size, present_full}.#[cfg(test)]instead of deleting:generate_fake_cookie,mpscinconnection_manager,PathBufinos_keypath.DesktopConnectionandStreamProgressCallback<'_>.#[allow(clippy::too_many_arguments)]on four hot-path functions where a context struct would obscure the call, and#[allow(clippy::result_large_err)]for tungstenite's fixedaccept_hdr_asynccallback type.Test plan
cargo clippy→ 0 warnings (was 54)cargo test --lib→ 543 passed / 0 failed / 55 ignoredcargo build→ successcargo fmt --checkwas not run as a gate: main already has pre-existing formatting drift under rustfmt 1.9, and normalizing it here would add ~1k unrelated linesRust-only change with no UI surface; no frontend files touched.