Skip to content

Conversation

Splashling1789
Copy link
Contributor

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.

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.62%. Comparing base (7c0bd13) to head (2b10b05).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@djc
Copy link
Member

djc commented Apr 3, 2025

Can you fix the formatting and squash your commits into a single one? I'll deal with the (unrelated) MSRV issue separately.

@djc
Copy link
Member

djc commented Apr 3, 2025

So clippy is suggesting that this should also get a custom Hash implementation (fixing the other, new, clippy issues and the MSRV issue in #1688).

@Splashling1789
Copy link
Contributor Author

Ok, it should be fine by now

@djc
Copy link
Member

djc commented Apr 3, 2025

The no_std build is failing. Please rebase on current main to fix the MSRV issue.

@Splashling1789
Copy link
Contributor Author

Okay, I think everything is fine now. Please let me know if there’s anything else!

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks!

@djc djc merged commit b267a4f into chronotope:main Apr 4, 2025
68 checks 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