-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
NaN handling broke in 1.0.6 #153
Comments
The documentation for ryu::Buffer::format says:
it looks like |
I see. Yeah, I think doing the explicit check with I also filed an issue upstream to see about perhaps fixing this inside of |
I believe this issue can now be resolved simply by bumping |
@jesskfullwood Awesome, thanks for the tip. I'll do the upgrade when I context switch back into this library, since there are a few other things I'd like to tidy up, and then do a |
We fix NaN handling by upgrading ryu to 1.0, which by default formats NaN/non-finites for us. Fixes #153
What version of the
csv
crate are you using?The problem arose in 6105a6a, which was released as 1.0.6.
Briefly describe the question, bug or feature request.
Not a number values of f64 ("NaN") are no longer serialized as
"NaN"
but rather an extreme value such as"2.696539702293474e308"
. I have not checked if this also affects f32.Include a complete program demonstrating a problem.
Change the tutorial
tutorial-write-serde-02.rs
like this:What is the observed behavior of the code above?
I now get the following output:
Note the extreme latitude value for Oakman.
What is the expected or desired behavior of the code above?
whereas with the previous commit, I got:
The text was updated successfully, but these errors were encountered: