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

Remove dep on fraction #4459

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

Manishearth
Copy link
Member

See discussion in #3922 (comment)

Doesn't seem too complicated.

cc @younies @robertbastian

@Manishearth Manishearth requested review from sffc, robertbastian and a team as code owners December 14, 2023 18:40
@Manishearth Manishearth requested a review from sffc December 14, 2023 18:40
pub fn convert_scientific_notation_to_fraction(
number: &str,
) -> Result<GenericFraction<BigUint>, DataError> {
pub fn convert_scientific_notation_to_fraction(number: &str) -> Result<Ratio<BigInt>, DataError> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using BigRational

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to add a dep on the num metacrate for this, and BigRational is just a typedef

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're trying to keep dependencies low; I'm fine pulling in more num crates but we don't have to pull in all of them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, got it

Copy link
Member

@younies younies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Manishearth , have you considered using BigRational

younies
younies previously approved these changes Dec 14, 2023
@Manishearth Manishearth merged commit 4640823 into unicode-org:main Dec 15, 2023
29 checks passed
@Manishearth Manishearth deleted the fraction-rm branch December 15, 2023 00:22
Manishearth added a commit to Manishearth/icu4x that referenced this pull request Dec 19, 2023
Backports unicode-org#4459

Unlike that PR, this makes these deps dev-deps since they're not yet
used by an experimental feature
Manishearth added a commit to Manishearth/icu4x that referenced this pull request Dec 19, 2023
Backports unicode-org#4459

Unlike that PR, this makes these deps dev-deps since they're not yet
used by an experimental feature
Manishearth added a commit that referenced this pull request Dec 19, 2023
Backports #4459 and
#4458

Backport approved in #4458

Unlike that PR, this makes these deps dev-deps since they're not yet
used by an experimental feature
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.

3 participants