Skip to content

Commit 85dc7b6

Browse files
author
Yidong Wei
committed
lint
1 parent 5c1c183 commit 85dc7b6

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/serializer.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,14 @@ where
4444
decimal_point: false,
4545
scientific: false,
4646
}
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-
} else {
55-
dtoa_short::write(dest, value)?
47+
} else if let Some(int_val) = int_value {
48+
write!(dest, "{}", int_val)?;
49+
Notation {
50+
decimal_point: false,
51+
scientific: false,
5652
}
53+
} else {
54+
dtoa_short::write(dest, value)?
5755
};
5856

5957
if int_value.is_none() && value.fract() == 0. && !notation.decimal_point && !notation.scientific

0 commit comments

Comments
 (0)