Skip to content

Fix clippy 1.98 lints - #373

Open
m11y wants to merge 1 commit into
doy:mainfrom
m11y:fix/clippy-1.98
Open

m11y wants to merge 1 commit into
doy:mainfrom
m11y:fix/clippy-1.98

Conversation

@m11y

@m11y m11y commented Sep 3, 2026 •

Copy link
Copy Markdown

Summary

  • cargo clippy --all-targets --all-features -- -Dwarnings (the CI lint job) currently fails on main with stable clippy 1.98. CI reports four of them; the other four are hidden because the library fails to compile first.
  • Fixes all eight with no behavior change: question_mark in actions::unlock (x2), collapsible_match in api::classify_login_error, useless_borrows_in_formatting in dirs::runtime_dir, map_unwrap_or in commands::search, and uninlined_format_args (x2) plus borrow_as_ptr in rbw-agent::debugger.

The collapsible_match fix turns the "" arm of classify_login_error into a guarded arm. Behavior is unchanged: when the guard is false the value falls through to the existing _ => {}, which is what the inner if already did.

MSRV stays at 1.82: &raw const is stable in 1.82 and Result::is_ok_and in 1.70.

CI note

With this branch the lint job now gets past cargo clippy and cargo fmt --check for the first time, and then fails at its third step, cargo deny check, on RustSec advisories in Cargo.lock (bytes integer overflow, two quick-xml DoS advisories, rand unsoundness, four rustls-webpki advisories, and yanked spin). Those are independent of this change and need a dependency refresh, which seemed like your call rather than something to fold in here.

Test plan

  • cargo clippy --all-targets --all-features -- -Dwarnings (clean; was 8 errors)
  • cargo fmt --check
  • cargo test --all-features
  • Verified against stable 1.98.0, the same version CI resolves

New stable clippy fails `cargo clippy --all-targets --all-features
-- -Dwarnings` on main:

* question_mark in actions::unlock (x2)
* collapsible_match in api::classify_login_error
* useless_borrows_in_formatting in dirs::runtime_dir
* map_unwrap_or in commands::search
* uninlined_format_args and borrow_as_ptr in rbw-agent::debugger (x3)

No behavior change. MSRV stays 1.82: `&raw const` and
`Result::is_ok_and` are both stable there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant