]> Cypherpunks repositories - gostls13.git/commitdiff
bufio: remove unnecessary "continue"
authorQuentin Smith <quentin@golang.org>
Fri, 21 Oct 2016 21:30:15 +0000 (17:30 -0400)
committerQuentin Smith <quentin@golang.org>
Mon, 24 Oct 2016 14:49:44 +0000 (14:49 +0000)
After resizing the scan buffer, we can immediately read into the
newly-resized buffer since we know there is now space.

Fixes #15712.

Change-Id: I56fcfaeb67045ee753a012c37883aa7c81b6e877
Reviewed-on: https://go-review.googlesource.com/31715
Run-TryBot: Quentin Smith <quentin@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/bufio/scan.go

index 27a0f0045955e301ce698723e6a89c93c135c9e9..9f741c983070159906ed59c24a84cd58fbc5ec95 100644 (file)
@@ -199,7 +199,6 @@ func (s *Scanner) Scan() bool {
                        s.buf = newBuf
                        s.end -= s.start
                        s.start = 0
-                       continue
                }
                // Finally we can read some input. Make sure we don't get stuck with
                // a misbehaving Reader. Officially we don't need to do this, but let's