chore: update for loop in RingBuffer impl
This commit is contained in:
parent
baa3fb7905
commit
54143332ab
|
@ -365,7 +365,7 @@ pub fn RingBuffer(comptime T: type) type {
|
||||||
const count = std.math.min(self.len(), cpy.len);
|
const count = std.math.min(self.len(), cpy.len);
|
||||||
var start: Index = self.read;
|
var start: Index = self.read;
|
||||||
|
|
||||||
for (cpy) |*v, i| {
|
for (cpy, 0..) |*v, i| {
|
||||||
if (i >= count) break;
|
if (i >= count) break;
|
||||||
|
|
||||||
v.* = self.buf[self.mask(start)];
|
v.* = self.buf[self.mask(start)];
|
||||||
|
|
Loading…
Reference in New Issue