summaryrefslogtreecommitdiff
path: root/exercises/026_hello2.zig
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/026_hello2.zig')
-rw-r--r--exercises/026_hello2.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/exercises/026_hello2.zig b/exercises/026_hello2.zig
index 081c2b3..7daa9e2 100644
--- a/exercises/026_hello2.zig
+++ b/exercises/026_hello2.zig
@@ -5,7 +5,7 @@
//
const std = @import("std");
-// Instance for input/output, we'll learn how to create them later.
+// Instance for input/output operations, we'll learn how to create them later.
const io = std.Options.debug_io;
// Take note that this main() definition now returns "!void" rather
@@ -18,8 +18,9 @@ const io = std.Options.debug_io;
// https://ziglang.org/documentation/master/#Inferred-Error-Sets
//
pub fn main() !void {
- // We get a Writer interface for Standard Out so we can print() to it.
+ // We get a Writer for Standard Out...
var stdout_writer = std.Io.File.stdout().writer(io, &.{});
+ // ...and extract its interface so we can print() to it.
const stdout = &stdout_writer.interface;
// Unlike std.debug.print(), the Standard Out writer can fail