-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement equality check #275
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
==========================================
- Coverage 83.37% 83.30% -0.07%
==========================================
Files 52 52
Lines 14668 14721 +53
==========================================
+ Hits 12229 12264 +35
- Misses 2439 2457 +18 ☔ View full report in Codecov by Sentry. |
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.
I think a custom PartialEq/Eq impl would be better. We should be able to ignore the ‘base’, ‘exact’, ‘format’ and ‘simplifiable’ fields. It would also be nice to take units into account, so that e.g. 2m is equal to 200cm.
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.
My latest commit implements comparing values with different units although i haven't tested it thoroughly.
Wow, you’re on a roll with all the things you’ve been implementing recently. Thanks so much for all your work!! I’ve left a small comment to improve the equality checks a bit, but otherwise your implementation looks excellent! |
Potential implementation of #229
I used the regular rust way of
PartialEq
andEq
to check for equality.