From c7d562b9acd6500f14e6d4c6caf3ac2236f0a835 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 22 Feb 2023 16:45:06 -0600 Subject: [PATCH] chore: update for loop in RingBuffer impl --- src/util.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.zig b/src/util.zig index b135e2a..85177bf 100644 --- a/src/util.zig +++ b/src/util.zig @@ -365,7 +365,7 @@ pub fn RingBuffer(comptime T: type) type { const count = std.math.min(self.len(), cpy.len); var start: Index = self.read; - for (cpy) |*v, i| { + for (cpy, 0..) |*v, i| { if (i >= count) break; v.* = self.buf[self.mask(start)];