mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-03-28 21:34:52 +00:00
fix zig build error when '.progress.txt' contains newline
This commit is contained in:
parent
3ecaa34271
commit
178fd9cef3
|
|
@ -278,7 +278,8 @@ pub fn build(b: *Build) !void {
|
||||||
return error.UnexpectedEOF;
|
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| {
|
} else |err| {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
std.Io.File.OpenError.FileNotFound => {
|
std.Io.File.OpenError.FileNotFound => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user