remove anytype
This commit is contained in:
parent
5c19fc894b
commit
b1c80180bb
2 changed files with 6 additions and 11 deletions
4
src/cache/store.zig
vendored
4
src/cache/store.zig
vendored
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue