-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
It seems that a recent version (either 1.89 or 1.90) changed the way #![deny(clippy::all)] works (see #25). The current code actually fails with Rust 1.88:
$ cargo +1.88 clippy
Checking openair v0.4.0 (/home/danilo/Projects/openair-rs)
error: variables can be used directly in the `format!` string
--> src/lib.rs:665:30
|
665 | .map_err(|_| format!("Invalid transponder code: {}", data))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
note: the lint level is defined here
--> src/lib.rs:25:9
|
25 | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::uninlined_format_args)]` implied by `#[deny(clippy::all)]`
help: change this to
|
665 - .map_err(|_| format!("Invalid transponder code: {}", data))?;
665 + .map_err(|_| format!("Invalid transponder code: {data}"))?;
|
error: could not compile `openair` (lib) due to 1 previous error
It probably makes sense to enable some of the pedantic lints like this one as well (like this one). When running with #![warn(clippy::pedantic)], I currently get 12 warnings.
What's your opinion on clippy, @Turbo87? As strict as possible (and add #[allow(...)] when actually valid), or do you think that's too much noise and pedantic clippy should just be run locally from time to time?