From 7a03fc23efa6a9516135f9a2ea6c5499dd4a0eec Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Thu, 30 May 2024 15:10:51 +0200 Subject: [PATCH] fix: MultiUnmarshaler.List method prealloc --- unmarshaler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unmarshaler.go b/unmarshaler.go index b45c973..d6d0a40 100644 --- a/unmarshaler.go +++ b/unmarshaler.go @@ -11,7 +11,7 @@ type MultiUnmarshaler[H header.Header[H]] struct { } func (d MultiUnmarshaler[H]) List() []ProofType { - types := make([]ProofType, len(d.Unmarshalers)) + types := make([]ProofType, 0, len(d.Unmarshalers)) for tp := range d.Unmarshalers { types = append(types, tp) }