Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind authored and Markus Westerlind committed Jul 4, 2022
1 parent f595267 commit 60e4ac2
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 @@ -1572,13 +1572,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 @@ -1599,11 +1596,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 60e4ac2

Please sign in to comment.