Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

No description provided.

@waywardmonkeys
Copy link
Contributor Author

On main right now, this happens:

❯ cargo +beta clippy --features arbitrary,bytemuck,serde
   Compiling serde v1.0.203
    Checking arbitrary v1.3.2
    Checking bytemuck v1.16.1
    Checking bitflags v2.6.0 (.../bitflags)
warning: unnecessary closure used to substitute value for `Option::None`
  --> src/external/arbitrary.rs:12:5
   |
12 |     B::from_bits(u.arbitrary()?).ok_or_else(|| arbitrary::Error::IncorrectFormat)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------------------
   |                                  |
   |                                  help: use `ok_or(..)` instead: `ok_or(arbitrary::Error::IncorrectFormat)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
   = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default

warning: `bitflags` (lib) generated 1 warning (run `cargo clippy --fix --lib -p bitflags` to apply 1 suggestion)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.24s

Copy link
Contributor

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit 89e004d into bitflags:main Jul 20, 2024
@waywardmonkeys waywardmonkeys deleted the clippy-on-extra-features branch July 20, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants