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 Apr 7, 2022
1 parent 948e1e1 commit 8f622cd
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/de.rs
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 8f622cd

Please sign in to comment.