Skip to content
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

NAUM-6 Add v2::ToFraction #65

Merged
merged 5 commits into from
May 14, 2024
Merged

NAUM-6 Add v2::ToFraction #65

merged 5 commits into from
May 14, 2024

Conversation

turboladen
Copy link
Contributor

@turboladen turboladen commented May 14, 2024

This is what I think I'd like to use to replace the existing AsFraction trait, which is problematic (see the related ticket). I

  • Added a v2 feature flag
  • Added a v2::convert module
  • Added the v2::convert::ToFraction trait
  • Implemented the trait for Unit and Measurement (there was no AsFraction trait for Measurement before)
  • Fixed the AsFraction::as_fraction() implementation to only iterate through all nested Terms once (to collect numerators and denominators along the way) instead of iterating once for numerators and once for denominators.
  • Got rid of lazy_static as a dep (was only used in 2 sets of tests)

This also gets rid of lazy_static as a dev dep.
...instead of twice (once for numerators, once for denominators).
@turboladen turboladen merged commit daede18 into develop May 14, 2024
4 checks passed
@turboladen turboladen deleted the feature/NAUM-6-to-fraction branch May 14, 2024 17:25
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