aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/webcore.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/webcore.zig')
-rw-r--r--src/bun.js/webcore.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bun.js/webcore.zig b/src/bun.js/webcore.zig
index 8cb9ec80a..5fdc64c82 100644
--- a/src/bun.js/webcore.zig
+++ b/src/bun.js/webcore.zig
@@ -419,7 +419,7 @@ pub const Crypto = struct {
var cost: ?usize = null;
var parallelization: ?usize = null;
var maxmem: usize = 32 * 1024 * 1024;
- const keylen = @intCast(u32, @truncate(i33, keylen_int));
+ const keylen = @as(u32, @intCast(@as(i33, @truncate(keylen_int))));
if (options) |options_value| outer: {
if (options_value.isUndefined() or options_value == .zero)
@@ -441,7 +441,7 @@ pub const Crypto = struct {
.{},
);
} else if (N_int != 0) {
- cost = @intCast(usize, N_int);
+ cost = @as(usize, @intCast(N_int));
}
}
@@ -456,7 +456,7 @@ pub const Crypto = struct {
.{},
);
} else if (r_int != 0) {
- blockSize = @intCast(usize, r_int);
+ blockSize = @as(usize, @intCast(r_int));
}
}
@@ -471,7 +471,7 @@ pub const Crypto = struct {
.{},
);
} else if (p_int != 0) {
- parallelization = @intCast(usize, p_int);
+ parallelization = @as(usize, @intCast(p_int));
}
}
@@ -485,7 +485,7 @@ pub const Crypto = struct {
.{},
);
} else if (p_int != 0) {
- maxmem = @intCast(usize, p_int);
+ maxmem = @as(usize, @intCast(p_int));
}
}
}
@@ -664,7 +664,7 @@ pub const Crypto = struct {
) callconv(.C) JSC.JSValue {
var slice = array.slice();
randomData(globalThis, slice.ptr, slice.len);
- return @enumFromInt(JSC.JSValue, @bitCast(i64, @intFromPtr(array)));
+ return @as(JSC.JSValue, @enumFromInt(@as(i64, @bitCast(@intFromPtr(array)))));
}
fn randomData(