authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-11-23 18:42:22+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-11-25 09:26:33+11:00
log1a84bcefb658b45103155725067e0820dd4243a0
treec44f3023b78ac9b7ed126a36d894a4de7e487413
parent94485b2a58f8efbfb61e46d2efa257420f12a22d
signaturelock-open Commit is signed but in an unrecognized format.

std: fix mismatched doc-comment/argument names in fifo.rewind


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/fifo.zig+5-5
......@@ -300,18 +300,18 @@ pub fn LinearFifo(
300300 else
301301 struct {};
302302
303 /// Make `count` bytes available before the current read location
304 fn rewind(self: *Self, size: usize) void {
305 assert(self.writableLength() >= size);
303 /// Make `count` items available before the current read location
304 fn rewind(self: *Self, count: usize) void {
305 assert(self.writableLength() >= count);
306306
307 var head = self.head + (self.buf.len - size);
307 var head = self.head + (self.buf.len - count);
308308 if (powers_of_two) {
309309 head &= self.buf.len - 1;
310310 } else {
311311 head %= self.buf.len;
312312 }
313313 self.head = head;
314 self.count += size;
314 self.count += count;
315315 }
316316
317317 /// Place data back into the read stream