-
Notifications
You must be signed in to change notification settings - Fork 589
Implemented a consistent Eq trait for NaiveWeek. #1687
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1687 +/- ##
==========================================
+ Coverage 90.60% 90.62% +0.02%
==========================================
Files 38 38
Lines 16830 16867 +37
==========================================
+ Hits 15249 15286 +37
Misses 1581 1581 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Can you fix the formatting and squash your commits into a single one? I'll deal with the (unrelated) MSRV issue separately. |
270f4ac
to
9da25c4
Compare
61abaff
to
1d9b7f0
Compare
So clippy is suggesting that this should also get a custom |
be1afb7
to
17547f9
Compare
Ok, it should be fine by now |
The no_std build is failing. Please rebase on current main to fix the MSRV issue. |
a0bc154
to
6a85301
Compare
Okay, I think everything is fine now. Please let me know if there’s anything else! |
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.
Thanks!
NaiveWeek previously exhibited an inconsistency in the derived Eq and PartialEq traits, as discussed in Issue #1686. This issue arose because the derived implementations did not accurately compare weeks when the arbitrary date field differed.
To resolve this, I have implemented a custom PartialEq trait that ensures accurate week comparisons based on the first day of the week. The Eq trait remains derived, relying on the updated functionality of PartialEq. Additionally, I have included a test to validate this implementation and ensure its correctness.