Skip to content

Commit

Permalink
allow trailing characters to fit in the last field with is_trailing_p…
Browse files Browse the repository at this point in the history
…arsing
  • Loading branch information
dragonnn committed Jan 8, 2024
1 parent fe971a4 commit d4e36e5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions serde_at/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ impl<'a> Deserializer<'a> {
self.index += 1;
}

fn end(&mut self) -> Result<()> {
match self.parse_whitespace() {
Some(_) => Err(Error::TrailingCharacters),
None => Ok(()),
}
}

fn next_char(&mut self) -> Option<&u8> {
if let Some(ch) = self.slice.get(self.index) {
self.index += 1;
Expand Down Expand Up @@ -745,7 +738,6 @@ where
{
let mut de = Deserializer::new(trim_ascii_whitespace(v));
let value = de::Deserialize::deserialize(&mut de)?;
de.end()?;
Ok(value)
}

Expand Down

0 comments on commit d4e36e5

Please sign in to comment.