-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix let_unit_value suggests wrongly for format macros
#15085
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
Conversation
|
r? clippy |
|
r? clippy |
| let res = return_unit(); | ||
| //~^ let_unit_value | ||
| do_something(res); | ||
| println!("{res:?}"); |
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.
Would it be possible to include a (non-machine-applicable) suggestion to remove this res as well? Then we could get rid of let res = entirely
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'm ok with this PR as is. Further improvements can have their own PRs, as a treat.
|
Thank you! |
Closes #15061
changelog: [
let_unit_value] fix wrong suggestions for format macros