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

Use float total_cmp instead of partial_cmp to get a total order. #2651

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

rhogenson
Copy link

@rhogenson rhogenson commented Oct 26, 2024

Since Rust version 1.81, sort_by will panic if the provided comparison function does not implement a total order.
See rust-lang/rust#129561 for more details. Fixes #2650, and potentially addresses pop-os/cosmic-epoch#1016

I ran cargo test and cargo clippy

Since Rust version 1.81, sort_by will panic if the provided comparison
function does not implement a total order.
See https://github.com/rust/lang/rust/issues/129561 for more details.
The simplest fix seems to be to use total_cmp instead of partial_cmp.
@hecrj hecrj added this to the 0.14 milestone Oct 28, 2024
@hecrj hecrj added bug Something isn't working rendering fix labels Oct 28, 2024
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thanks!

@hecrj hecrj enabled auto-merge October 28, 2024 16:31
@hecrj hecrj merged commit 50340b4 into iced-rs:master Oct 28, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in cosmic-launcher
2 participants