Skip to content

Commit

Permalink
Merge pull request #789 from serde-rs/orpattern
Browse files Browse the repository at this point in the history
Restore compatiblity with older rustc after PR 786
  • Loading branch information
dtolnay committed Jul 29, 2021
2 parents c38fc65 + 53e6ce4 commit 7780a67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ impl<'de, R: Read<'de>> Deserializer<R> {
fn scan_number(&mut self, buf: &mut String) -> Result<()> {
match tri!(self.peek_or_null()) {
b'.' => self.scan_decimal(buf),
c @ (b'e' | b'E') => self.scan_exponent(c as char, buf),
e @ b'e' | e @ b'E' => self.scan_exponent(e as char, buf),
_ => Ok(()),
}
}
Expand All @@ -924,7 +924,7 @@ impl<'de, R: Read<'de>> Deserializer<R> {
}

match tri!(self.peek_or_null()) {
c @ (b'e' | b'E') => self.scan_exponent(c as char, buf),
e @ b'e' | e @ b'E' => self.scan_exponent(e as char, buf),
_ => Ok(()),
}
}
Expand Down

0 comments on commit 7780a67

Please sign in to comment.