formatdict.zig

This commit is contained in:
Folkert 2021-06-07 21:04:09 +02:00
parent 032c509c0d
commit 6850fd4ed9

View file

@ -20,13 +20,9 @@ const Slot = packed enum(u8) {
PreviouslyFilled, PreviouslyFilled,
}; };
const MaybeIndexTag = enum { const MaybeIndexTag = enum { index, not_found };
index, not_found
};
const MaybeIndex = union(MaybeIndexTag) { const MaybeIndex = union(MaybeIndexTag) { index: usize, not_found: void };
index: usize, not_found: void
};
fn nextSeed(seed: u64) u64 { fn nextSeed(seed: u64) u64 {
// TODO is this a valid way to get a new seed? are there better ways? // TODO is this a valid way to get a new seed? are there better ways?