aboutsummaryrefslogtreecommitdiff
path: root/src/install/resolvers/folder_resolver.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/install/resolvers/folder_resolver.zig')
-rw-r--r--src/install/resolvers/folder_resolver.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/install/resolvers/folder_resolver.zig b/src/install/resolvers/folder_resolver.zig
index 90a2a414c..0ece2be7f 100644
--- a/src/install/resolvers/folder_resolver.zig
+++ b/src/install/resolvers/folder_resolver.zig
@@ -30,7 +30,7 @@ pub const FolderResolution = union(Tag) {
}
pub fn hash(normalized_path: string) u64 {
- return std.hash.Wyhash.hash(0, normalized_path);
+ return bun.hash(normalized_path);
}
fn NewResolver(comptime tag: Resolution.Tag) type {
@@ -95,9 +95,9 @@ pub const FolderResolution = union(Tag) {
.global, .cache_folder => {
const path = if (global_or_relative == .global) global_or_relative.global else global_or_relative.cache_folder;
if (path.len > 0) {
- const offset = path.len -| @as(usize, @boolToInt(path[path.len -| 1] == std.fs.path.sep));
+ const offset = path.len -| @as(usize, @intFromBool(path[path.len -| 1] == std.fs.path.sep));
if (offset > 0)
- @memcpy(remain.ptr, path.ptr, offset);
+ @memcpy(remain[0..offset], path[0..offset]);
remain = remain[offset..];
if (normalized.len > 0) {
if ((path[path.len - 1] != std.fs.path.sep) and (normalized[0] != std.fs.path.sep)) {