Use std.mem alias

This commit is contained in:
Oleksii Ihnatenko 2025-08-08 12:18:16 +03:00
parent a9d4211d4d
commit 194880f871

View file

@ -398,7 +398,7 @@ pub fn shuffleWithIndex(r: Random, comptime T: type, buf: []T, comptime Index: t
// Pop an index from the queue and perform a swap
fn pop(q: *@This(), slice: []T) void {
const idx = q.ringbuf[q.swap_idx % q.ringbuf.len];
std.mem.swap(T, &slice[q.swap_idx], &slice[idx]);
mem.swap(T, &slice[q.swap_idx], &slice[idx]);
q.swap_idx += 1;
}
};