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
Conversation
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.
Actually why not use ratio.get_ratio().to_f64()
?
either way, we need to have the feature of "big-int", also, and what is the point of have as in #4841. |
You'll need both, checking
That you can define things like |
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.
.
@@ -69,7 +69,7 @@ fn test_cldr_unit_tests() { | |||
); | |||
} | |||
|
|||
let test_result_f64 = test.result.to_f64().unwrap(); | |||
let test_result_f64 = test.result.clone().get_ratio().to_f64().unwrap(); |
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.
This is why there should also be a -> &BigRational
method, this clone is not necessary because to_f64
doesn't need ownership. However, given that this is in-crate, you can use test.result.0.to_f64()
I prefer that these functions to be implemented for |
No description provided.