-
Notifications
You must be signed in to change notification settings - Fork 9
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 clippy warnings/errors #436
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #436 +/- ##
==========================================
- Coverage 81.92% 81.91% -0.02%
==========================================
Files 63 63
Lines 16728 16718 -10
Branches 16728 16718 -10
==========================================
- Hits 13705 13694 -11
+ Misses 2470 2460 -10
- Partials 553 564 +11
☔ View full report in Codecov by Sentry. |
Conformance comparison report
Number passing in both: 5731 Number failing in both: 612 Number passing in Base (fbaac0f) but now fail: 0 Number failing in Base (fbaac0f) but now pass: 0 |
let mut l = self.0.iter(); | ||
let mut r = other.0.iter(); | ||
|
||
loop { | ||
match (l.next(), r.next()) { | ||
(None, None) => return Some(Ordering::Equal), | ||
(Some(_), None) => return Some(Ordering::Greater), | ||
(None, Some(_)) => return Some(Ordering::Less), | ||
(Some(lv), Some(rv)) => match lv.partial_cmp(rv) { | ||
None => return None, | ||
Some(Ordering::Less) => return Some(Ordering::Less), | ||
Some(Ordering::Greater) => return Some(Ordering::Greater), | ||
Some(Ordering::Equal) => continue, | ||
}, | ||
} | ||
} |
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.
Having both Ord
and PartialOrd
implemented (with a non-default implementation) results in a clippy error: https://rust-lang.github.io/rust-clippy/master/index.html#/incorrect_partial_ord_impl_on_ord_type
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.
Nice dive deep! Thank you for the fix!
Seems like GH Actions CI has been failing since a recent clippy change turned a warning into an error. PR also fixes a different clippy warning.
This should fix the GitHub Actions failure seen in #435.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.