Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Jan 12, 2021
1 parent 1d3fd89 commit e769d7a
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,13 +1554,10 @@ impl<'de, 'a, R: Read<'de>> de::Deserializer<'de> for &'a mut Deserializer<R> {
{
let mut buf = String::new();

match tri!(self.parse_whitespace_in_value()) {
b'-' => {
self.eat_char();
buf.push('-');
}
_ => {}
};
if tri!(self.parse_whitespace_in_value()) == b'-' {
self.eat_char();
buf.push('-');
}

tri!(self.scan_integer128(&mut buf));

Expand All @@ -1581,11 +1578,8 @@ impl<'de, 'a, R: Read<'de>> de::Deserializer<'de> for &'a mut Deserializer<R> {
where
V: de::Visitor<'de>,
{
match tri!(self.parse_whitespace_in_value()) {
b'-' => {
return Err(self.peek_error(ErrorCode::NumberOutOfRange));
}
_ => {}
if tri!(self.parse_whitespace_in_value()) == b'-' {
return Err(self.peek_error(ErrorCode::NumberOutOfRange));
}

let mut buf = String::new();
Expand Down

0 comments on commit e769d7a

Please sign in to comment.