fixup util/xpool
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
1a9236caad
commit
53b40617e2
@ -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) })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user