From 54fde912454f8310e951f46afa97a701f9388a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 25 Feb 2025 00:19:50 +0900 Subject: [PATCH] fix(pbuf): dat passing --- pbuf/bytes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pbuf/bytes.go b/pbuf/bytes.go index a1942ca..6d9832e 100644 --- a/pbuf/bytes.go +++ b/pbuf/bytes.go @@ -48,6 +48,7 @@ func (bufferPool BufferPool) ParseBytes(b ...byte) Bytes { // Trans please refer to Item.Trans(). func (b Bytes) Trans() (tb Bytes) { tb.buf = b.buf.Trans() + tb.dat = b.dat return } @@ -69,12 +70,14 @@ func (b Bytes) Bytes() []byte { // Ref please refer to Item.Ref(). func (b Bytes) Ref() (rb Bytes) { rb.buf = b.buf.Ref() + rb.dat = b.dat return } // Copy please refer to Item.Copy(). func (b Bytes) Copy() (cb Bytes) { cb.buf = b.buf.Copy() + cb.dat = b.dat return }