-
Notifications
You must be signed in to change notification settings - Fork 197
Update unit conversion to accept unit constant denominator #6199
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
Update unit conversion to accept unit constant denominator #6199
Conversation
This commit adds comprehensive tests for unit conversion scenarios including: - Conversion between units with constant denominators (e.g., liter-per-100-kilometer to mile-per-gallon) - Temperature conversions with offsets (celsius to fahrenheit) - Adds a new `from_integer` method to `IcuRatio` - Removes TODO comment blocking constant denominator unit tests
Changelog please (all PRs until the beta2 release should contain a changelog entry. In general it is best practice to do this anyway even after a release.) |
beta2 is released, the changelog entry should be moved to the unreleased section (in #6203, approve and merge that first) |
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.
IcuRation should probably have Mul and Div impls on integers.
@@ -8,6 +8,10 @@ | |||
- `icu_collections` | |||
- Remove some panics from `CodePointTrie`, which should no longer pull in panic machinery even with arithmetic panics enabled for lookup (unicode-org#6204) | |||
- Data model and providers | |||
- `icu_experimental` | |||
- `dimension` | |||
- `units` |
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.
just under units
not dimension
/units
Description
from_integer
method toIcuRatio