Skip to content

Commit

Permalink
chore: remove useless comptime check (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptisserand authored Oct 7, 2024
1 parent 315a8a2 commit cc73c54
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/types/transaction.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const Self = @This();
pub fn serializeToWriter(self: *const Self, w: anytype) !void {
comptime {
if (!std.meta.hasFn(@TypeOf(w), "writeInt")) @compileError("Expects w to have field 'writeInt'.");
if (!std.meta.hasFn(@TypeOf(w), "writeAll")) @compileError("Expects w to have field 'writeAll'.");
}

const compact_input_len = CompactSizeUint.new(self.inputs.len);
Expand Down Expand Up @@ -64,8 +63,6 @@ pub fn serialize(self: *const Self, allocator: std.mem.Allocator) ![]u8 {
pub fn deserializeReader(allocator: std.mem.Allocator, r: anytype) !Self {
comptime {
if (!std.meta.hasFn(@TypeOf(r), "readInt")) @compileError("Expects r to have fn 'readInt'.");
if (!std.meta.hasFn(@TypeOf(r), "readNoEof")) @compileError("Expects r to have fn 'readNoEof'.");
if (!std.meta.hasFn(@TypeOf(r), "readAll")) @compileError("Expects r to have fn 'readAll'.");
if (!std.meta.hasFn(@TypeOf(r), "readByte")) @compileError("Expects r to have fn 'readByte'.");
}

Expand Down

0 comments on commit cc73c54

Please sign in to comment.