ziglings/patches/patches/036_enums2.patch

26 lines
785 B
Diff

--- exercises/036_enums2.zig 2023-10-03 22:15:22.122241138 +0200
+++ answers/036_enums2.zig 2023-10-05 20:04:07.002765884 +0200
@@ -31,7 +31,7 @@
const Color = enum(u32) {
red = 0xff0000,
green = 0x00ff00,
- blue = ???,
+ blue = 0x0000ff,
};
pub fn main() void {
@@ -53,12 +53,12 @@
\\<p>
\\ <span style="color: #{x:0>6}">Red</span>
\\ <span style="color: #{x:0>6}">Green</span>
- \\ <span style="color: #{}">Blue</span>
+ \\ <span style="color: #{x:0>6}">Blue</span>
\\</p>
\\
, .{
@intFromEnum(Color.red),
@intFromEnum(Color.green),
- @intFromEnum(???), // Oops! We're missing something!
+ @intFromEnum(Color.blue), // Oops! We're missing something!
});
}