mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
use std.mem.swap
This commit is contained in:
parent
d2ff1d735d
commit
12c186813d
2 changed files with 3 additions and 9 deletions
|
@ -542,9 +542,7 @@ pub fn listWalk(
|
|||
const element = source_ptr + i * element_width;
|
||||
caller(data, element, b2, b1);
|
||||
|
||||
const temp = b1;
|
||||
b2 = b1;
|
||||
b1 = temp;
|
||||
std.mem.swap([*]u8, &b1, &b2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -591,9 +589,7 @@ pub fn listWalkBackwards(
|
|||
const element = source_ptr + i * element_width;
|
||||
caller(data, element, b2, b1);
|
||||
|
||||
const temp = b1;
|
||||
b2 = b1;
|
||||
b1 = temp;
|
||||
std.mem.swap([*]u8, &b1, &b2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue