Apply suggestions

Co-authored-by: Many <many@meilisearch.com>
This commit is contained in:
Clément Renault 2022-03-15 14:18:29 +01:00 committed by GitHub
parent 21ec334dcc
commit 0c5f4ed7de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ impl CboRoaringBitmapCodec {
buffer.extend_from_slice(&integer.to_ne_bytes()); buffer.extend_from_slice(&integer.to_ne_bytes());
} }
} else { } else {
// Integers *must* be ordered here, no matter what. // We can unwrap safely because the vector is sorted upper.
let roaring = RoaringBitmap::from_sorted_iter(vec.into_iter()).unwrap(); let roaring = RoaringBitmap::from_sorted_iter(vec.into_iter()).unwrap();
roaring.serialize_into(buffer)?; roaring.serialize_into(buffer)?;
} }