1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

perf(serde_v8/de): implement SeqAccess size_hint (#9975)

This commit is contained in:
Aaron O'Mullan 2021-04-03 02:12:10 +02:00 committed by GitHub
parent 8257f51d7e
commit 105c0ee3b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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> {