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 some clippy lint. #80

Merged
merged 5 commits into from
Jun 23, 2024
Merged

Fix some clippy lint. #80

merged 5 commits into from
Jun 23, 2024

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
1 check 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