Remove unused coral IO functions

This commit is contained in:
kayomn 2023-04-19 20:53:51 +01:00
parent bb2745c3d0
commit a7605c6ffa
1 changed files with 207 additions and 219 deletions

12
source/coral/io.zig Normal file → Executable file
View File

@ -84,14 +84,6 @@ pub const Reader = struct {
} }
}; };
pub fn Tag(comptime Element: type) type {
return switch (@typeInfo(Element)) {
.Enum => |info| info.tag_type,
.Union => |info| info.tag_type orelse @compileError(@typeName(Element) ++ " has no tag type"),
else => @compileError("expected enum or union type, found '" ++ @typeName(Element) ++ "'"),
};
}
pub const WriteError = error{ pub const WriteError = error{
IoUnavailable, IoUnavailable,
}; };
@ -210,10 +202,6 @@ pub fn swap(comptime Element: type, this: *Element, that: *Element) void {
that.* = temp; that.* = temp;
} }
pub fn tag(value: anytype) Tag(@TypeOf(value)) {
return @as(Tag(@TypeOf(value)), value);
}
pub fn zero(target: []u8) void { pub fn zero(target: []u8) void {
for (target) |*t| t.* = 0; for (target) |*t| t.* = 0;
} }