Skip to content

Commit

Permalink
perf(serde_v8/de): implement SeqAccess size_hint (denoland#9975)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronO committed Apr 3, 2021
1 parent 8257f51 commit 105c0ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serde_v8/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ impl<'de> de::SeqAccess<'de> for SeqAccess<'_, '_, '_> {
Ok(None)
}
}

fn size_hint(&self) -> Option<usize> {
Some((self.len - self.pos) as usize)
}
}

struct EnumAccess<'a, 'b, 's> {
Expand Down

0 comments on commit 105c0ee

Please sign in to comment.