]> Cypherpunks repositories - gostls13.git/commit
bytes: improve readability of IndexAny and LastIndexAny functions
authorGabriel Aszalos <gabriel.aszalos@gmail.com>
Mon, 25 Sep 2017 11:01:36 +0000 (13:01 +0200)
committerIan Lance Taylor <iant@golang.org>
Mon, 25 Sep 2017 18:05:01 +0000 (18:05 +0000)
commitb71f39612adb671c176586cd9b0018eb3c716f3c
treeff1ff6a3be6ba81da1731bc72f7741f9379980e9
parentf22ba1f24786be600bfa3686a7ce5a318a96b9c9
bytes: improve readability of IndexAny and LastIndexAny functions

This change removes the check of len(chars) > 0 inside the Index and
IndexAny functions which was redundant.

Change-Id: Ic4bf8b8a37d7f040d3ebd81b4fc45fcb386b639a
Reviewed-on: https://go-review.googlesource.com/65851
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/bytes/bytes.go