We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c1c183 commit 85dc7b6Copy full SHA for 85dc7b6
src/serializer.rs
@@ -44,16 +44,14 @@ where
44
decimal_point: false,
45
scientific: false,
46
}
47
- } else {
48
- if let Some(int_val) = int_value {
49
- write!(dest, "{}", int_val)?;
50
- Notation {
51
- decimal_point: false,
52
- scientific: false,
53
- }
54
55
- dtoa_short::write(dest, value)?
+ } else if let Some(int_val) = int_value {
+ write!(dest, "{}", int_val)?;
+ Notation {
+ decimal_point: false,
+ scientific: false,
56
+ } else {
+ dtoa_short::write(dest, value)?
57
};
58
59
if int_value.is_none() && value.fract() == 0. && !notation.decimal_point && !notation.scientific
0 commit comments