chore: update for loop in RingBuffer impl

This commit is contained in:
Rekai Nyangadzayi Musuka 2023-02-22 16:45:06 -06:00
parent 71dd667d89
commit c7d562b9ac
1 changed files with 1 additions and 1 deletions

View File

@ -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)];