Skip to content

Commit

Permalink
refactor(wasm-api-dom): remove obsolete ItemType enum
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Oct 11, 2022
1 parent 078df79 commit 1ea7c63
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/wasm-api-dom/include/managed-index.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const std = @import("std");
const builtin = @import("builtin");
const Allocator = std.mem.Allocator;

const ItemType = enum(u1) { value, id };

/// `std.Arraylist` based data structure for associating and auto-indexing
/// newly added items with numeric IDs and managing a pool of free IDs.
/// Wraps `std.Arraylist` with a simple add()/remove()/get()/has() API and
Expand All @@ -17,7 +15,7 @@ pub fn ManagedIndex(comptime T: type, comptime I: type) type {
if (!(info == .Int and info.Int.bits > 0 and info.Int.signedness == std.builtin.Signedness.unsigned)) {
@compileError("require unsigned int as index type");
}
const Item = union(ItemType) {
const Item = union(enum) {
/// Actual user defined value
value: T,
/// Free list slot ID. Index of the next avail free slot
Expand Down

0 comments on commit 1ea7c63

Please sign in to comment.