Skip to content
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

ci: silence unnecessary_map_or lint as solution requires MSRV >= 1.70 #3518

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

dunxen
Copy link
Contributor

@dunxen dunxen commented Jan 10, 2025

Rust 1.84.0 was recently released along with some new clippy lints, one of which is unnecessary_map_or. Unfortunately this lint suggests using Option::is_some_and as a fix, but this is only available in Rust
version >= 1.70, while we still have an MSRV of 1.63. So we silence that
lint for now.

We'd still like our lint CI to use stable Rust so that we can benefit from new lint checks which may be helpful and don't require an MSRV bump, but sometimes new lints (like in this case) do.

See:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some_and

Rust 1.84.0 was recently released along with some new clippy lints, one
of which is `unnecessary_map_or`. Unfortunately this lint suggests using
`Option::is_some_and` as a fix, but this is only available in Rust
 version >= 1.70, while we still have an MSRV of 1.63. So we silence that
lint for now.

We'd still like our lint CI to use stable Rust so that we can benefit from
new lint checks which may be helpful and don't require an MSRV bump, but
sometimes new lints (like in this case) do.

See:
  https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
  https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some_and
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Thanks!

@tnull tnull merged commit cb5bf96 into lightningdevkit:main Jan 10, 2025
17 of 19 checks passed
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