Skip to content

Commit 5a15055

Browse files
committed
fix bad cherry-pick
1 parent 6f4487d commit 5a15055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/key_value.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn KeyValue(V: type, hashFn: fn (key: []const u8) callconv(.Inline) u8) type {
2121
pub fn init(allocator: Allocator, max: usize) Allocator.Error!Self {
2222
// we want type with bigger alignment to be first.
2323
// Since alignment is always a power of 2, the second type is guaranteed to have correct alignment.
24-
const allocation = try allocator.alignedAlloc(u8, alignment, max * size);
24+
const allocation = try allocator.alignedAlloc(u8, std.mem.Alignment.fromByteUnits(alignment), max * size);
2525
return .{
2626
.len = 0,
2727
.keys = @as([*][]const u8, @alignCast(@ptrCast(if (kFirst) allocation.ptr else allocation[max * @sizeOf(V)..].ptr)))[0..max],

0 commit comments

Comments
 (0)