Skip to content

Commit 25f3975

Browse files
committed
funcs: no need to hardcode this when we depend on ansi
1 parent 977e866 commit 25f3975

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/util/funcs.zig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const string = []const u8;
33
const gpa = std.heap.c_allocator;
44
const extras = @import("extras");
55
const git = @import("git");
6+
const ansi = @import("ansi");
67

78
//
89
//
@@ -12,12 +13,9 @@ pub const kb = b * 1024;
1213
pub const mb = kb * 1024;
1314
pub const gb = mb * 1024;
1415

15-
const ansi_red = "\x1B[31m";
16-
const ansi_reset = "\x1B[39m";
17-
1816
pub fn assert(ok: bool, comptime fmt: string, args: anytype) void {
1917
if (!ok) {
20-
std.debug.print(ansi_red ++ fmt ++ ansi_reset ++ "\n", args);
18+
std.debug.print(ansi.color.Fg(.Red, fmt) ++ "\n", args);
2119
std.process.exit(1);
2220
}
2321
}

0 commit comments

Comments
 (0)