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 @@...@@ -1,6 +1,6 @@
1const std = @import("std");1const std = @import("std");
22
3pub const ascii = enum(u8) {3pub const ascii = enum(u7) {
4 NUL,4 NUL,
5 SOH,5 SOH,
6 STX,6 STX,
...@@ -33,9 +33,10 @@ pub const ascii = enum(u8) {...@@ -33,9 +33,10 @@ pub const ascii = enum(u8) {
33 GS,33 GS,
34 RS,34 RS,
35 US,35 US,
36 _,
3637
37 pub fn s(self: ascii) []const u8 {38 pub fn s(self: ascii) [1]u8 {
38 return &[_]u8{@intFromEnum(self)};39 return .{@intFromEnum(self)};
39 }40 }
40};41};
4142
...@@ -53,7 +54,7 @@ pub const escape = struct {...@@ -53,7 +54,7 @@ pub const escape = struct {
53};54};
5455
55fn make_csi_sequence(comptime c: []const u8, comptime x: anytype) []const u8 {56fn 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;
57}58}
5859
59fn arr_i_to_s(x: anytype) [][]const u8 {60fn arr_i_to_s(x: anytype) [][]const u8 {
src/main.zig-1
...@@ -1,5 +1,4 @@...@@ -1,5 +1,4 @@
1const std = @import("std");1const std = @import("std");
2
3const ansi = @import("./lib.zig");2const ansi = @import("./lib.zig");
43
5pub fn main() anyerror!void {4pub fn main() anyerror!void {