Function readAssumeLength [src]
Consume a byte from the ring buffer and return it; asserts that the buffer
is not empty.
Prototype
pub fn readAssumeLength(self: *RingBuffer) u8
Parameters
self: *RingBuffer
Source
pub fn readAssumeLength(self: *RingBuffer) u8 {
assert(!self.isEmpty());
const byte = self.data[self.mask(self.read_index)];
self.read_index = self.mask2(self.read_index + 1);
return byte;
}