-
Notifications
You must be signed in to change notification settings - Fork 71
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
Adding baseline to reports #602
base: main
Are you sure you want to change the base?
Conversation
3826aff
to
362de7d
Compare
This new feature would benefit from some documentation. It's not clear to me how to use it. Is this a bug, or am I doing something wrong?
|
Yes, I can understand that 🤣 … I wanted to wait for the other PR to finish first. I did rebase and update this PR now, also brought back the "number format" for big integers. I'll work on documentation next. |
646b474
to
e089265
Compare
I am able to reproduce this. I looks like these are cases where a division by zero happens, which results in |
The problem seems to be this: fn main() {
let json = serde_json::to_string(&(0f32 / 0f32)).unwrap();
println!("{json}");
let value : f32 = serde_json::from_str(&json).unwrap();
println!("{value}");
} |
And here is the corresponding issue: serde-rs/json#202 … It might make sense to follow the way of adding a custom deserializer: serde-rs/json#202 (comment) |
Serde serializes f32s of value NaN to `null`, but doesn't serialize them back from `null` to NaN. For that we need a custom deserialize. Also see: <serde-rs/json#202>
I updated the PR. Works for me now. Still lacks documentation. |
|
Ah, that was stabilized in 1.79.0. IIRC that was only syntactic sugar. I'll see if I can work around that. |
Done. |
LGTM (and yes I would say that!) |
Based on #600