printfn / fend

Arbitrary-precision unit-aware calculator
https://printfn.github.io/fend
MIT License
587 stars 50 forks source link

Implement equality check #275

Closed frectonz closed 4 months ago

frectonz commented 4 months ago

Potential implementation of #229 I used the regular rust way of PartialEq and Eq to check for equality.

image

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 68.75000% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 83.30%. Comparing base (7dce963) to head (c3e7795).

Files Patch % Lines
core/src/ast.rs 38.09% 13 Missing :warning:
core/src/num/unit.rs 40.00% 3 Missing :warning:
core/src/lexer.rs 71.42% 2 Missing :warning:
core/src/scope.rs 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

printfn commented 4 months ago

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!

frectonz commented 4 months ago

thanks for the kind words :pray: and btw i also implemented inequality

image

frectonz commented 4 months ago

Comparisons of different units is now implemented 🎉

image