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 unneeded to_f64 funciton #4839

Merged
merged 14 commits into from
May 14, 2024
Merged
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/experimental/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ zerovec = { workspace = true, features = ["derive", "yoke"] }
displaydoc = { workspace = true }
log = { workspace = true, optional = true }
num-bigint = { workspace = true }
num-rational = { workspace = true }
num-rational = { workspace = true, features = ["num-bigint"]}
num-traits = { workspace = true }
serde = { workspace = true, features = ["derive", "alloc"], optional = true }
smallvec = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/units/ratio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl IcuRatio {
// TODO: Make the function private after fixing the need for it in the tests.
/// Returns the value of the ratio as a `f64`.
pub fn to_f64(&self) -> Option<f64> {
Some(self.0.numer().to_f64()? / self.0.denom().to_f64()?)
self.0.to_f64()
}

/// Returns the absolute value of the ratio.
Expand Down