From 77f6a34e34b394d570819ef2fc6ce2d42c232573 Mon Sep 17 00:00:00 2001
From: Patrice Tisserand
Date: Mon, 7 Oct 2024 11:37:12 +0200
Subject: [PATCH] remove useless comptime check
---
src/types/transaction.zig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/types/transaction.zig b/src/types/transaction.zig
index fb9bcee..34068d4 100644
--- a/src/types/transaction.zig
+++ b/src/types/transaction.zig
@@ -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);
@@ -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'.");
}