Skip to content

Conversation

Foreverhighness
Copy link
Contributor

It seems like partial_cmp never return None, so I made small change of it.
The new implementation has a small logic change from the previous one, since arguments passed to Ordering::then are eagerly evaluated.
I pefer it because it's more succinct than Ordering::then_with and without notable performace penalty. That's enough for an educational project.


My rust version is rustc 1.79.0 (129f3b996 2024-06-10), so there are new clippy warnnings, list below.

It looks lik assigning_clones is allowed by default from the webpage, but when I run cargo clippy, I get a warning.

Copy link
Owner

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@skyzh skyzh merged commit aa35a96 into skyzh:main Jun 23, 2024
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