-
Notifications
You must be signed in to change notification settings - Fork 568
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
Satisfy clippy 1.67 beta. #2326
Conversation
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.
It looks like there are still some warnings in druid/src/env.rs
and druid-shell/examples/invalidate.rs
Yeah there are even some more, which I'll also handle. However the more serious issue is that there is an infinite loop of clippy with the beta toolchain. warning: variables can be used directly in the `format!` string
--> druid\src\widget\flex.rs:619:13
|
619 | / debug_assert!(
620 | | flex >= 0.0,
621 | | "flex value for space should be greater than equal to 0, received: {}",
622 | | flex
623 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default into warning: panic message contains an unused formatting placeholder
--> druid\src\widget\flex.rs:621:84
|
621 | "flex value for space should be greater than equal to 0, received: {flex}"
| ^^^^^^
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
= note: `#[warn(non_fmt_panics)]` on by default
help: add the missing argument
|
621 | "flex value for space should be greater than equal to 0, received: {flex}", ...
| +++++
help: or add a "{}" format string to use the message literally
|
621 | "{}", "flex value for space should be greater than equal to 0, received: {flex}"
| +++++ I will investigate it tomorrow. Perhaps just updating the edition will solve the issue. However I feel clippy shouldn't recommend fixes that it itself will immediately complain about. |
Okay, so with the beta clippy both I think we might be able to just upgrade to Rust 2021 and get around this issue. I'll see if I can make it happen. |
Alright, this is ready for another look. It solves all clippy errors now. |
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.
🎉
Clippy lints addressed:
uninlined_format_args