From f3a9ea5aa91d80b8ad202459a174ba126c2d2354 Mon Sep 17 00:00:00 2001 From: YenForYang Date: Fri, 17 Sep 2021 21:36:25 -0500 Subject: [PATCH] Prevent allocation when checking interface (#649) --- bencode/bytes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bencode/bytes.go b/bencode/bytes.go index b196963b..5e1018e4 100644 --- a/bencode/bytes.go +++ b/bencode/bytes.go @@ -3,8 +3,8 @@ package bencode type Bytes []byte var ( - _ Unmarshaler = &Bytes{} - _ Marshaler = &Bytes{} + _ Unmarshaler = (*Bytes)(nil) + _ Marshaler = (*Bytes)(nil) _ Marshaler = Bytes{} ) -- 2.44.0