1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 16:44:06 +02:00

move benches to iai

This commit is contained in:
Robin Appelman 2021-07-18 19:55:45 +02:00
commit 94bc320add
3 changed files with 188 additions and 210 deletions

View file

@ -362,7 +362,7 @@ where
});
}
if position + count + USIZE_BIT_SIZE > self.bit_len() {
if position + USIZE_BIT_SIZE > self.bit_len() {
if position + count > self.bit_len() {
return if position > self.bit_len() {
Err(BitError::IndexOutOfBounds {
@ -712,7 +712,7 @@ where
T: Float + UncheckedPrimitiveFloat,
{
let type_bit_size = size_of::<T>() * 8;
if position + type_bit_size + USIZE_BIT_SIZE > self.bit_len() {
if position + USIZE_BIT_SIZE > self.bit_len() {
if position + type_bit_size > self.bit_len() {
if position > self.bit_len() {
return Err(BitError::IndexOutOfBounds {