Skip to content

Commit f3df680

Browse files
committed
Touch up PR 1306
1 parent e16730f commit f3df680

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/de.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,22 +1028,18 @@ impl<'de, R: Read<'de>> Deserializer<R> {
10281028
self.eat_char();
10291029
buf.push('e');
10301030

1031-
let has_sign = match tri!(self.peek_or_null()) {
1031+
match tri!(self.peek_or_null()) {
10321032
b'+' => {
10331033
self.eat_char();
10341034
buf.push('+');
1035-
true
10361035
}
10371036
b'-' => {
10381037
self.eat_char();
10391038
buf.push('-');
1040-
true
10411039
}
1042-
_ => false,
1043-
};
1044-
1045-
if !has_sign {
1046-
buf.push('+');
1040+
_ => {
1041+
buf.push('+');
1042+
}
10471043
}
10481044

10491045
// Make sure a digit follows the exponent place.

0 commit comments

Comments
 (0)