Skip to content

Commit f3e6ed8

Browse files
author
James Cor
committed
use cap
1 parent a9101fd commit f3e6ed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/byte_buffer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (b *ByteBuffer) Grow(n int) {
5959
// length.
6060
func (b *ByteBuffer) Double() {
6161
// TODO: This wastes memory. The first half of b.buf won't be referenced by anything.
62-
buf := make([]byte, len(b.buf)*2)
62+
buf := make([]byte, cap(b.buf)*2)
6363
copy(buf, b.buf)
6464
b.buf = buf
6565
}

0 commit comments

Comments
 (0)