aboutsummaryrefslogtreecommitdiff
path: root/lib/std/sort
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/sort')
-rw-r--r--lib/std/sort/pdq.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/sort/pdq.zig b/lib/std/sort/pdq.zig
index 23678a79c6..795dd29fc5 100644
--- a/lib/std/sort/pdq.zig
+++ b/lib/std/sort/pdq.zig
@@ -251,7 +251,7 @@ fn breakPatterns(a: usize, b: usize, context: anytype) void {
const len = b - a;
if (len < 8) return;
- var rand = @intCast(u64, len);
+ var rand = @as(u64, @intCast(len));
const modulus = math.ceilPowerOfTwoAssert(u64, len);
var i = a + (len / 4) * 2 - 1;
@@ -261,7 +261,7 @@ fn breakPatterns(a: usize, b: usize, context: anytype) void {
rand ^= rand >> 7;
rand ^= rand << 17;
- var other = @intCast(usize, rand & (modulus - 1));
+ var other = @as(usize, @intCast(rand & (modulus - 1)));
if (other >= len) other -= len;
context.swap(i, a + other);
}