-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: apply Clippy suggestions and improve code formatting #10691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
7489d4f to
adb143f
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
|
@nyurik I've been fixing some clippy lints, I usually stick to 1 lint per PR for ease of review |
|
GNU testsuite comparison: |
| } | ||
| } | ||
|
|
||
| #[expect(clippy::unnested_or_patterns)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please document "why"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment - but the extended version: this is what it would look like after optimization -- i don't think it's as readable
[b'l' | b'r' | b'e', b'c']
| [b'r', b's']
| [b'n' | b's' | b'd', b'o']
| [b'f' | b'd' | b'p' | b'm', b'i']
| [b'l', b'n']
| [b'b' | b'c', b'd']
| [b'o', b'r' | b'w']
| [b'e', b'x']
| [b's', b'u' | b'g' | b't']
| [b't', b'w']
| [b'c', b'a' | b'l']
| [b'm', b'h']| let mut formatted_possible_values = String::new(); | ||
| for (i, s) in possible_values.iter().enumerate() { | ||
| formatted_possible_values.push_str(&format!("'{}'", s.get_name())); | ||
| let _ = write!(formatted_possible_values, "'{}'", s.get_name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems unrelated?
No description provided.