aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/value.zig b/src/value.zig
index eeb1228ebc..45b2bfd341 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -814,7 +814,6 @@ pub const Value = extern union {
.float_80 => return out_stream.print("{}", .{val.castTag(.float_80).?.data}),
.float_128 => return out_stream.print("{}", .{val.castTag(.float_128).?.data}),
.@"error" => return out_stream.print("error.{s}", .{val.castTag(.@"error").?.data.name}),
- // TODO to print this it should be error{ Set, Items }!T(val), but we need the type for that
.eu_payload => {
try out_stream.writeAll("(eu_payload) ");
val = val.castTag(.eu_payload).?.data;
@@ -989,8 +988,7 @@ pub const Value = extern union {
switch (val.tag()) {
.enum_field_index => {
const field_index = val.castTag(.enum_field_index).?.data;
- // TODO should `@intToEnum` do this `@intCast` for you?
- return @intToEnum(E, @intCast(@typeInfo(E).Enum.tag_type, field_index));
+ return @intToEnum(E, field_index);
},
.the_only_possible_value => {
const fields = std.meta.fields(E);