WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Clippy config #30

@dbrgn

Description

@dbrgn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions