Skip to content

Commit

Permalink
use custom grow method
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Mar 8, 2024
1 parent 2a89101 commit 77335ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/writers/buffer/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (b *Buffer) Write(ctx context.Context, data []byte) (int, error) {
// which may require multiple allocations and copies if the size required is much larger
// than double the capacity. Our approach aligns with default behavior when growth sizes
// happen to match current capacity, retaining asymptotic efficiency benefits.
b.Buffer.Grow(growSize)
b.Grow(growSize)
}

return b.Buffer.Write(data)
Expand Down

0 comments on commit 77335ae

Please sign in to comment.