[nightshift] lint-doctor-fix: apply clippy pedantic/nursery auto-fixes#54
Merged
Merged
Conversation
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
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.
Automated by Nightshift v3 (GLM 5.1).
Task: lint-doctor-fix
Category: pr
Tool:
cargo clippy --fixwith-W clippy::pedantic -W clippy::nurserySummary
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)
map().unwrap_or()→map_or()/is_some_and()/map_or_else()format!("{}", x)→format!("{x}"))const fnSelf::instead of struct name in Display implsEqalongsidePartialEqu32 as f64→f64::from()(lossless casts)#from raw stringif !x { a } else { b }→if x { b } else { a })_→(), trailing semicolonsVerification
cargo buildpassesMerge if useful, close if not.