-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add support for E PluralOperand #407
Conversation
b644b47
to
1038f66
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
This seems to be ready for review. The issue is performance. It impacts it a lot. Like, I could microoptimize it by refactoring to do a single iteration over the string, but since we want to switch I'll consider trying just for fun, but since any potential optimizations are local to the |
Codecov Report
@@ Coverage Diff @@
## master #407 +/- ##
==========================================
+ Coverage 74.83% 74.91% +0.08%
==========================================
Files 90 90
Lines 4641 4661 +20
==========================================
+ Hits 3473 3492 +19
- Misses 1168 1169 +1
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build cefed3b5c91be645e7c1898167199fd1358bcf01-PR-407
💛 - Coveralls |
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.
LGTM. Seems pretty straightforward, and as you said, it makes sense to not think about the performance impact yet since you'll be moving stuff around including some of this into FixedDecimal as a followup anyways.
Here's the official language on
So, in other words, we should name the field "c", but we should accept an alias "e" when parsing the rules. https://sites.google.com/site/cldr/index/downloads/cldr-38?pli=1#TOC-Migration |
components/plurals/src/operands.rs
Outdated
@@ -67,6 +70,8 @@ pub struct PluralOperands { | |||
pub f: u64, | |||
/// Visible fraction digits without trailing zeros | |||
pub t: u64, | |||
/// Exponent |
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.
nit: consider being a bit more verbose about what the exponent means?
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Fixes #228