Merge pull request 'rivendell: Remove the resetLine function' (#488) from manliop/exercises:remove-resetLine into main

Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/488
This commit is contained in:
Chris Boesch
2026-07-02 23:56:15 +02:00
-6
View File
@@ -359,7 +359,6 @@ fn runExe(ctx: Context, ex: Exercise) !void {
return err;
};
resetLine();
print("Checking {s}...\n", .{ex.main_file});
return checkOutput(io, arena, ex, result);
@@ -392,7 +391,6 @@ fn runTest(ctx: Context, ex: Exercise) !void {
return err;
};
resetLine();
print("Checking {s}...\n", .{ex.main_file});
return checkTest(ex, result);
@@ -486,10 +484,6 @@ fn help(ex: Exercise, mode: Mode) void {
});
}
fn resetLine() void {
if (stderr_term_mode == .escape_codes) print("{s}", .{"\x1b[2K\r"});
}
// Removes trailing whitespace per line and any trailing LF at the end.
fn trimLines(arena: std.mem.Allocator, buf: []const u8) ![]const u8 {
var list = try std.ArrayList(u8).initCapacity(arena, buf.len);