mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Use std.mem alias
This commit is contained in:
parent
a9d4211d4d
commit
194880f871
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
// Pop an index from the queue and perform a swap
|
||||||
fn pop(q: *@This(), slice: []T) void {
|
fn pop(q: *@This(), slice: []T) void {
|
||||||
const idx = q.ringbuf[q.swap_idx % q.ringbuf.len];
|
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;
|
q.swap_idx += 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue