diff --git a/patches/patches/026_hello2.patch b/patches/patches/026_hello2.patch index f0224a1..f99cc67 100644 --- a/patches/patches/026_hello2.patch +++ b/patches/patches/026_hello2.patch @@ -1,9 +1,9 @@ ---- exercises/026_hello2.zig 2023-10-03 22:15:22.122241138 +0200 -+++ answers/026_hello2.zig 2023-10-05 20:04:06.959431737 +0200 +--- exercises/026_hello2.zig 2025-07-22 09:55:51.337832401 +0200 ++++ answers/026_hello2.zig 2025-07-22 10:00:11.233348058 +0200 @@ -23,5 +23,5 @@ // to be able to pass it up as a return value of main(). // // We just learned of a single statement which can accomplish this. -- stdout.print("Hello world!\n", .{}); -+ try stdout.print("Hello world!\n", .{}); +- stdout.interface.print("Hello world!\n", .{}); ++ try stdout.interface.print("Hello world!\n", .{}); } diff --git a/patches/patches/034_quiz4.patch b/patches/patches/034_quiz4.patch index 8c0bc0e..15c95fc 100644 --- a/patches/patches/034_quiz4.patch +++ b/patches/patches/034_quiz4.patch @@ -1,15 +1,15 @@ ---- exercises/034_quiz4.zig 2023-10-03 22:15:22.122241138 +0200 -+++ answers/034_quiz4.zig 2023-10-05 20:04:06.996099091 +0200 +--- exercises/034_quiz4.zig 2025-07-22 09:55:51.337832401 +0200 ++++ answers/034_quiz4.zig 2025-07-22 10:05:08.320323184 +0200 @@ -9,10 +9,10 @@ const NumError = error{IllegalNumber}; -pub fn main() void { +pub fn main() !void { - const stdout = std.io.getStdOut().writer(); + var stdout = std.fs.File.stdout().writer(&.{}); - const my_num: u32 = getNumber(); + const my_num: u32 = try getNumber(); - try stdout.print("my_num={}\n", .{my_num}); + try stdout.interface.print("my_num={}\n", .{my_num}); }