-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
#[test]
fn decode_128() {
let (buf, len) = varint_simd::encode(128u8);
assert_eq!(&buf[..len as usize], [128, 1]);
// 💥 should ask for more bytes, instead returns Ok((0, 2)).
assert!(matches!(
varint_simd::decode::<u8>(&buf[..1]),
Err(varint_simd::VarIntDecodeError::NotEnoughBytes)
));
}
as-com
Metadata
Metadata
Assignees
Labels
No labels