Remove RocResult from utils.zig

It is implemented wrong and not used anywhere
This commit is contained in:
Brendan Hansknecht 2022-10-10 08:25:59 -07:00
parent b84c05fad9
commit fdafac4323
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
2 changed files with 0 additions and 20 deletions

View file

@ -267,25 +267,6 @@ pub fn unsafeReallocate(
return new_source;
}
pub const RocResult = extern struct {
bytes: ?[*]u8,
pub fn isOk(self: RocResult) bool {
// assumptions
//
// - the tag is the first field
// - the tag is usize bytes wide
// - Ok has tag_id 1, because Err < Ok
const usizes: [*]usize = @ptrCast([*]usize, @alignCast(@alignOf(usize), self.bytes));
return usizes[0] == 1;
}
pub fn isErr(self: RocResult) bool {
return !self.isOk();
}
};
pub const Ordering = enum(u8) {
EQ = 0,
GT = 1,