remove anytype

This commit is contained in:
Emil Lerch 2026-03-20 10:58:44 -07:00
parent 5c19fc894b
commit b1c80180bb
Signed by: lobo
GPG key ID: A7B62D657EF764F8
2 changed files with 6 additions and 11 deletions

4
src/cache/store.zig vendored
View file

@ -595,7 +595,7 @@ pub const Store = struct {
return aw.toOwnedSlice(); 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; var chains: std.ArrayList(OptionsChain) = .empty;
errdefer { errdefer {
for (chains.items) |*ch| { for (chains.items) |*ch| {
@ -694,7 +694,7 @@ pub const Store = struct {
return aw.toOwnedSlice(); 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 profile = EtfProfile{ .symbol = "" };
var sectors: std.ArrayList(SectorWeight) = .empty; var sectors: std.ArrayList(SectorWeight) = .empty;
errdefer { errdefer {

View file

@ -807,7 +807,7 @@ pub fn computeBrailleChart(
/// Write a braille chart to a writer with ANSI color escapes. /// Write a braille chart to a writer with ANSI color escapes.
/// Used by the CLI for terminal output. /// Used by the CLI for terminal output.
pub fn writeBrailleAnsi( pub fn writeBrailleAnsi(
out: anytype, out: *std.Io.Writer,
chart: *const BrailleChart, chart: *const BrailleChart,
use_color: bool, use_color: bool,
muted_color: [3]u8, muted_color: [3]u8,
@ -888,22 +888,17 @@ pub fn shouldUseColor(no_color_flag: bool) bool {
} }
/// Write an ANSI 24-bit foreground color escape. /// 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 }); try out.print("\x1b[38;2;{d};{d};{d}m", .{ r, g, b });
} }
/// Write ANSI bold. /// Write ANSI bold.
pub fn ansiBold(out: anytype) !void { pub fn ansiBold(out: *std.Io.Writer) !void {
try out.writeAll("\x1b[1m"); try out.writeAll("\x1b[1m");
} }
/// Write ANSI dim.
pub fn ansiDim(out: anytype) !void {
try out.writeAll("\x1b[2m");
}
/// Reset all ANSI attributes. /// Reset all ANSI attributes.
pub fn ansiReset(out: anytype) !void { pub fn ansiReset(out: *std.Io.Writer) !void {
try out.writeAll("\x1b[0m"); try out.writeAll("\x1b[0m");
} }