Fix comptime checks in slot map
continuous-integration/drone Build is passing Details

This commit is contained in:
kayomn 2024-09-01 22:37:36 +01:00
parent 455ede6d78
commit d1c823df41
1 changed files with 6 additions and 6 deletions

View File

@ -641,7 +641,12 @@ pub fn SlotMap(comptime Value: type) type {
.signedness = .unsigned,
}});
comptime std.debug.assert(@sizeOf(Index) == @sizeOf(usize));
const Slot = packed struct {
index: Index,
is_occupied: bool,
};
comptime std.debug.assert(@sizeOf(Slot) == @sizeOf(usize));
return struct {
slots: stack.Sequential(Slot),
@ -655,11 +660,6 @@ pub fn SlotMap(comptime Value: type) type {
const Self = @This();
const Slot = packed struct {
index: Index,
is_occupied: bool,
};
pub fn deinit(self: *Self) void {
self.slots.deinit();
self.entries.deinit();