diff --git a/util/xpool/pool.go b/util/xpool/pool.go index cfc8d5f0..fa27df3a 100644 --- a/util/xpool/pool.go +++ b/util/xpool/pool.go @@ -27,10 +27,10 @@ func (p Pool[T]) Put(t T) { p.p.Put(t) } -func NewBytePool(size int) Pool[T] { +func NewBytePool(size int) Pool[[]byte] { return NewPool(func() []byte { return make([]byte, size) }) } -func NewBytesPool() Pool[T] { +func NewBytesPool() Pool[*bytes.Buffer] { return NewPool(func() *bytes.Buffer { return bytes.NewBuffer(nil) }) }