summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig3
-rw-r--r--exercises/013_while3.zig4
-rw-r--r--exercises/068_comptime3.zig2
3 files changed, 5 insertions, 4 deletions
diff --git a/build.zig b/build.zig
index 0ad2a1e..c3b2a43 100644
--- a/build.zig
+++ b/build.zig
@@ -278,7 +278,8 @@ pub fn build(b: *Build) !void {
return error.UnexpectedEOF;
}
- starting_exercise = try std.fmt.parseInt(u32, contents, 10);
+ const trimmed_contents = std.mem.trim(u8, contents, "\r\n");
+ starting_exercise = try std.fmt.parseInt(u32, trimmed_contents, 10);
} else |err| {
switch (err) {
std.Io.File.OpenError.FileNotFound => {
diff --git a/exercises/013_while3.zig b/exercises/013_while3.zig
index 4cccf62..52d5ebd 100644
--- a/exercises/013_while3.zig
+++ b/exercises/013_while3.zig
@@ -11,8 +11,8 @@
//
// }
//
-// The "continue expression" executes every time the loop restarts
-// whether the "continue" statement happens or not.
+// The "continue expression" executes every single time the loop restarts,
+// even when a `continue` statement skips the rest of the loop body.
//
const std = @import("std");
diff --git a/exercises/068_comptime3.zig b/exercises/068_comptime3.zig
index 15b8997..bb82778 100644
--- a/exercises/068_comptime3.zig
+++ b/exercises/068_comptime3.zig
@@ -11,7 +11,7 @@
// format string can be checked for errors at compile time rather
// than crashing at runtime.
//
-// (The actual formatting is done by std.fmt.format() and it
+// (The actual formatting is done by std.Io.Writer.print() and it
// contains a complete format string parser that runs entirely at
// compile time!)
//