From 4cb7910e326ad8ff88bccf76c2fe2f5d3dce683d Mon Sep 17 00:00:00 2001 From: 190n Date: Wed, 4 Jun 2025 16:44:55 -0700 Subject: [PATCH] remove unnecessary explicit backing integer (#20188) --- src/bun.js/node.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/bun.js/node.zig b/src/bun.js/node.zig index 43759361e8..01cec18df3 100644 --- a/src/bun.js/node.zig +++ b/src/bun.js/node.zig @@ -73,13 +73,7 @@ pub fn Maybe(comptime ReturnTypeT: type, comptime ErrorTypeT: type) type { err: ErrorType, result: ReturnType, - /// NOTE: this has to have a well defined layout (e.g. setting to `u8`) - /// experienced a bug with a Maybe(void, void) - /// creating the `err` variant of this type - /// resulted in Zig incorrectly setting the tag, leading to a switch - /// statement to just not work. - /// we (Zack, Dylan, Chloe, Mason) observed that it was set to 0xFF in ReleaseFast in the debugger - pub const Tag = enum(u8) { err, result }; + pub const Tag = enum { err, result }; pub const retry: @This() = if (has_retry) .{ .err = ErrorType.retry } else .{ .err = .{} }; pub const success: @This() = .{