]> Cypherpunks repositories - gostls13.git/commit
bytes: re-slice buffer to its previous length after call to grow()
authorDave Russell <forfuncsake@gmail.com>
Sat, 19 May 2018 00:54:43 +0000 (00:54 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 29 May 2018 19:46:33 +0000 (19:46 +0000)
commit23b687eccbcc68f44acf34fd5971f0f5c04d90de
tree5fc7f99aebdc3c74a9580bcc4ee39cc23b9f6b8d
parentef53de8ba4d774e4eedb04192a9f03f28a9652e8
bytes: re-slice buffer to its previous length after call to grow()

Fixes #25435

The added test fails without the re-slice and passes with it.

Change-Id: I5ebc2a737285eb116ecc5938d8bf49050652830f
GitHub-Last-Rev: 454ddad7df8d56a1d0e05a999ed8277c5516ce01
GitHub-Pull-Request: golang/go#25436
Reviewed-on: https://go-review.googlesource.com/113495
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/bytes/buffer.go
src/bytes/buffer_test.go