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

fix(buffer): Consistent cmp vs == for Priority #4022

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Sep 10, 2024

Derive Priority::Eq from Priority::PartialOrd.

After INC-875, the custom Ord implementation for Priority was a suspect for occurring panics rust-lang/rust#129561.

It turned out the panic occurred somewhere else, but making Eq and PartialOrd consistent cannot hurt.

#skip-changelog

@jjbayer jjbayer self-assigned this Sep 10, 2024
@iambriccardo iambriccardo self-requested a review September 11, 2024 07:25
@jjbayer jjbayer marked this pull request as ready for review September 11, 2024 07:33
@jjbayer jjbayer requested a review from a team as a code owner September 11, 2024 07:33
Copy link
Contributor

@olksdr olksdr left a comment

Choose a reason for hiding this comment

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

@jjbayer have you managed to reproduce panic without your changes?

@jjbayer
Copy link
Member Author

jjbayer commented Sep 11, 2024

@jjbayer have you managed to reproduce panic without your changes?

.@iambriccardo was able to reproduce the panic and it turns out it was not the impl Ord for Priority. I.e. this PR won't fix anything, but it makes sense to align Ord and PartialEq regardless.

Copy link
Member

@iambriccardo iambriccardo left a comment

Choose a reason for hiding this comment

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

LGTM

@jjbayer jjbayer merged commit c2a8e86 into master Sep 12, 2024
25 of 26 checks passed
@jjbayer jjbayer deleted the fix/buffer-no-panic branch September 12, 2024 05:23
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.

3 participants