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

struct bench

This commit is contained in:
Robin Appelman 2020-01-07 19:50:42 +01:00
commit 4785f80cce
2 changed files with 27 additions and 5 deletions

View file

@ -133,9 +133,9 @@ where
where
T: PrimInt + BitOrAssign + IsSigned + UncheckedPrimitiveInt,
{
let result = self.buffer.read_int(self.pos, count);
self.pos += count;
self.buffer.read_int(self.pos, count)
result
}
#[inline]
@ -143,9 +143,9 @@ where
where
T: PrimInt + BitOrAssign + IsSigned + UncheckedPrimitiveInt,
{
let result = self.buffer.read_int_unchecked(self.pos, count);
self.pos += count;
self.buffer.read_int_unchecked(self.pos, count)
result
}
/// Read a sequence of bits from the stream as float