fn CpuinfoParser(comptime impl: anytype) type
fn CpuinfoParser(comptime impl: anytype) type { return struct { fn parse(arch: Target.Cpu.Arch, reader: *Io.Reader) !?Target.Cpu { var obj: impl = .{}; while (try reader.takeDelimiter('\n')) |line| { const colon_pos = mem.findScalar(u8, line, ':') orelse continue; const key = mem.trimEnd(u8, line[0..colon_pos], " \t"); const value = mem.trimStart(u8, line[colon_pos + 1 ..], " \t"); if (!try obj.line_hook(key, value)) break; } return obj.finalize(arch); } }; }