Skip to content

[nightshift] lint-doctor-fix: apply clippy pedantic/nursery auto-fixes#54

Merged
Microck merged 1 commit into
Microck:mainfrom
nightshift-micr:nightshift/lint-doctor-fix
Apr 17, 2026
Merged

[nightshift] lint-doctor-fix: apply clippy pedantic/nursery auto-fixes#54
Microck merged 1 commit into
Microck:mainfrom
nightshift-micr:nightshift/lint-doctor-fix

Conversation

@nightshift-micr

Copy link
Copy Markdown
Contributor

Automated by Nightshift v3 (GLM 5.1).

Task: lint-doctor-fix
Category: pr
Tool: cargo clippy --fix with -W clippy::pedantic -W clippy::nursery

Summary

Ran Clippy's auto-fix with pedantic and nursery lints enabled. Reduced warnings from 152 → 70 (remaining are structural: too_many_lines, excessive_bools, struct_field_names, assigning_clones).

Changes (10 files, -100/+86 lines)

Fix Type Count Files
map().unwrap_or()map_or() / is_some_and() / map_or_else() 10 api.rs, auth_wizard.rs, parser.rs
Inlined format args (format!("{}", x)format!("{x}")) 10 api.rs, error.rs, main.rs, quick.rs, search.rs
Added const fn 20+ auth.rs, auth_wizard.rs, cli.rs, main.rs, search.rs
Self:: instead of struct name in Display impls 14 cli.rs
Derived Eq alongside PartialEq 10 types.rs
u32 as f64f64::from() (lossless casts) 2 main.rs
Removed redundant closures 2 quick.rs
Removed needless # from raw string 1 auth_wizard.rs
Positive conditionals (if !x { a } else { b }if x { b } else { a }) 2 quick.rs
Doc comment backticks for code references 4 cli.rs
Unit pattern _(), trailing semicolons 2 parser.rs, main.rs

Verification

  • cargo build passes
  • ✅ All changes are mechanical Clippy auto-fixes
  • ✅ No behavioral changes
  • ✅ No new dependencies

Merge if useful, close if not.

Ran cargo clippy --fix with pedantic and nursery lints enabled.
152 warnings → 70 remaining (mostly structural: too_many_lines,
excessive_bools, struct_field_names, assigning_clones).

Changes (10 files, -100/+86 lines):
- map().unwrap_or() → map_or() / is_some_and() / map_or_else()
- Inlined format args (format!("{}", x) → format!("{x}"))
- Added const fn to 20+ simple functions
- Self:: instead of struct name in Display impls
- Derived Eq alongside PartialEq on 10 structs
- u32 as f64 → f64::from() for lossless casts
- Removed redundant closures, needless raw string hashes
- Swapped if !x { a } else { b } to positive conditionals
- Added backticks to doc comments per clippy
- Added () unit pattern, trailing semicolons
@Microck Microck merged commit 8e9e65d into Microck:main Apr 17, 2026
1 of 3 checks passed
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.

2 participants