Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
harley.li committed Jul 2, 2021
1 parent aaa7c36 commit 08b037b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (e *Encoder) Clean() {
// it reuse allocated buffer and reduce memory-allocation.
func (e *Encoder) ReuseBufferClean() {
var buffer []byte
if len(e.buffer) <= 128 {
if cap(e.buffer) <= 128 {
// reuse buffer, avoid allocate
buffer = e.buffer[:0]
} else {
Expand Down

0 comments on commit 08b037b

Please sign in to comment.