authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-16 03:24:26 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-16 03:24:26 -07:00
log2d1861381432e1ca631ba1ce4f9460d29e265ccc
tree11d8b137760b9067789b68bbd6a84b358ef5ca12
parent411eb48dba466fa5937e410b4265790f9d3be602

misc cleanup


2 files changed, 5 insertions(+), 5 deletions(-)

src/lib.zig+5-4
......@@ -1,6 +1,6 @@
11const std = @import("std");
22
3pub const ascii = enum(u8) {
3pub const ascii = enum(u7) {
44 NUL,
55 SOH,
66 STX,
......@@ -33,9 +33,10 @@ pub const ascii = enum(u8) {
3333 GS,
3434 RS,
3535 US,
36 _,
3637
37 pub fn s(self: ascii) []const u8 {
38 return &[_]u8{@intFromEnum(self)};
38 pub fn s(self: ascii) [1]u8 {
39 return .{@intFromEnum(self)};
3940 }
4041};
4142
......@@ -53,7 +54,7 @@ pub const escape = struct {
5354};
5455
5556fn make_csi_sequence(comptime c: []const u8, comptime x: anytype) []const u8 {
56 return escape.CSI ++ comptime _join(";", arr_i_to_s(x)) ++ c;
57 return comptime escape.CSI ++ _join(";", arr_i_to_s(x)) ++ c;
5758}
5859
5960fn arr_i_to_s(x: anytype) [][]const u8 {
src/main.zig-1
......@@ -1,5 +1,4 @@
11const std = @import("std");
2
32const ansi = @import("./lib.zig");
43
54pub fn main() anyerror!void {