Skip to content

Commit

Permalink
fix(serde_at): deserialize _
Browse files Browse the repository at this point in the history
  • Loading branch information
denysvitali authored and Aaavvv committed Jan 15, 2025
1 parent c31f700 commit 000bf7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serde_at/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl<'a> Deserializer<'a> {
self.index = self.slice.len();
return Ok(&self.slice[start..]);
} else if let Some(c) = self.peek() {
if (c as char).is_alphanumeric() || (c as char).is_whitespace() {
if (c as char).is_ascii() && c >= 32 {
self.eat_char();
} else {
return Err(Error::EofWhileParsingString);
Expand Down Expand Up @@ -473,7 +473,7 @@ impl<'a, 'de> de::Deserializer<'de> for &'a mut Deserializer<'de> {
visitor.visit_borrowed_str(self.parse_str()?)
}
_ => {
if (peek as char).is_alphabetic() {
if (peek as char).is_ascii() && peek >= 32 {
visitor.visit_bytes(self.parse_bytes()?)
} else {
Err(Error::InvalidType)
Expand Down

0 comments on commit 000bf7d

Please sign in to comment.