diff --git a/milli/src/heed_codec/roaring_bitmap/cbo_roaring_bitmap_codec.rs b/milli/src/heed_codec/roaring_bitmap/cbo_roaring_bitmap_codec.rs index 1bd132974..01ce523ba 100644 --- a/milli/src/heed_codec/roaring_bitmap/cbo_roaring_bitmap_codec.rs +++ b/milli/src/heed_codec/roaring_bitmap/cbo_roaring_bitmap_codec.rs @@ -49,7 +49,7 @@ impl CboRoaringBitmapCodec { } else { // Otherwise, it means we used the classic RoaringBitmapCodec and // that the header takes threshold integers. - RoaringBitmap::deserialize_from(bytes) + RoaringBitmap::deserialize_unchecked_from(bytes) } } @@ -69,7 +69,7 @@ impl CboRoaringBitmapCodec { vec.push(integer); } } else { - roaring |= RoaringBitmap::deserialize_from(bytes.as_ref())?; + roaring |= RoaringBitmap::deserialize_unchecked_from(bytes.as_ref())?; } } diff --git a/milli/src/heed_codec/roaring_bitmap/roaring_bitmap_codec.rs b/milli/src/heed_codec/roaring_bitmap/roaring_bitmap_codec.rs index 8fae9b8fd..6cec0eb44 100644 --- a/milli/src/heed_codec/roaring_bitmap/roaring_bitmap_codec.rs +++ b/milli/src/heed_codec/roaring_bitmap/roaring_bitmap_codec.rs @@ -8,7 +8,7 @@ impl heed::BytesDecode<'_> for RoaringBitmapCodec { type DItem = RoaringBitmap; fn bytes_decode(bytes: &[u8]) -> Option { - RoaringBitmap::deserialize_from(bytes).ok() + RoaringBitmap::deserialize_unchecked_from(bytes).ok() } }