-
Notifications
You must be signed in to change notification settings - Fork 904
[Merged by Bors] - Address Clippy 1.73 lints #4809
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
Conversation
self.score() | ||
.partial_cmp(&other.score()) | ||
.unwrap_or(std::cmp::Ordering::Equal) |
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 thought the old impl was pretty suspicious.
The effect of Clippy's suggested change is that partial_ord
will never return None
for incomparable values (like NaN
). I think this is OK, as we shouldn't be encountering this anyway (fingers crossed).
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 doesn't look like there are any other scenarios (other than comparing NaN
) where f64::partial_cmp
would return None, so this is probably fine 🤞
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.
Looks good! I've looked into the clippy suggestions as well, I think this change looks fine.
Thanks! bors r+ |
## Proposed Changes Fix Clippy lints enabled by default in Rust 1.73.0, released today.
Pull request successfully merged into unstable. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
* Address Clippy 1.73 lints (#4809) ## Proposed Changes Fix Clippy lints enabled by default in Rust 1.73.0, released today. * Address Clippy 1.73 lints. --------- Co-authored-by: Michael Sproul <[email protected]>
## Proposed Changes Fix Clippy lints enabled by default in Rust 1.73.0, released today.
## Proposed Changes Fix Clippy lints enabled by default in Rust 1.73.0, released today.
## Proposed Changes Fix Clippy lints enabled by default in Rust 1.73.0, released today.
Proposed Changes
Fix Clippy lints enabled by default in Rust 1.73.0, released today.