diff --git a/src/cache/store.zig b/src/cache/store.zig index f191885..9c3a329 100644 --- a/src/cache/store.zig +++ b/src/cache/store.zig @@ -595,7 +595,7 @@ pub const Store = struct { return aw.toOwnedSlice(); } - fn deserializeOptions(allocator: std.mem.Allocator, it: anytype) ![]OptionsChain { + fn deserializeOptions(allocator: std.mem.Allocator, it: *srf.RecordIterator) ![]OptionsChain { var chains: std.ArrayList(OptionsChain) = .empty; errdefer { for (chains.items) |*ch| { @@ -694,7 +694,7 @@ pub const Store = struct { return aw.toOwnedSlice(); } - fn deserializeEtfProfile(allocator: std.mem.Allocator, it: anytype) !EtfProfile { + fn deserializeEtfProfile(allocator: std.mem.Allocator, it: *srf.RecordIterator) !EtfProfile { var profile = EtfProfile{ .symbol = "" }; var sectors: std.ArrayList(SectorWeight) = .empty; errdefer { diff --git a/src/format.zig b/src/format.zig index 7c77c14..1b6b7e8 100644 --- a/src/format.zig +++ b/src/format.zig @@ -807,7 +807,7 @@ pub fn computeBrailleChart( /// Write a braille chart to a writer with ANSI color escapes. /// Used by the CLI for terminal output. pub fn writeBrailleAnsi( - out: anytype, + out: *std.Io.Writer, chart: *const BrailleChart, use_color: bool, muted_color: [3]u8, @@ -888,22 +888,17 @@ pub fn shouldUseColor(no_color_flag: bool) bool { } /// Write an ANSI 24-bit foreground color escape. -pub fn ansiSetFg(out: anytype, r: u8, g: u8, b: u8) !void { +pub fn ansiSetFg(out: *std.Io.Writer, r: u8, g: u8, b: u8) !void { try out.print("\x1b[38;2;{d};{d};{d}m", .{ r, g, b }); } /// Write ANSI bold. -pub fn ansiBold(out: anytype) !void { +pub fn ansiBold(out: *std.Io.Writer) !void { try out.writeAll("\x1b[1m"); } -/// Write ANSI dim. -pub fn ansiDim(out: anytype) !void { - try out.writeAll("\x1b[2m"); -} - /// Reset all ANSI attributes. -pub fn ansiReset(out: anytype) !void { +pub fn ansiReset(out: *std.Io.Writer) !void { try out.writeAll("\x1b[0m"); }