diff options
author | 2023-07-11 19:14:34 -0700 | |
---|---|---|
committer | 2023-07-11 19:14:34 -0700 | |
commit | cbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch) | |
tree | 43a00501f3cde495967e116f0b660777051551f8 /src/install/resolvers | |
parent | 1f900cff453700b19bca2acadfe26da4468c1282 (diff) | |
parent | 34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff) | |
download | bun-jarred/esm-conditions.tar.gz bun-jarred/esm-conditions.tar.zst bun-jarred/esm-conditions.zip |
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to '')
-rw-r--r-- | src/install/resolvers/folder_resolver.zig | 6 |
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)) { |