]> Cypherpunks repositories - gostls13.git/commit
all: remove strings.Contains check around Replace
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 11 Sep 2017 19:51:38 +0000 (21:51 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 12 Sep 2017 08:58:28 +0000 (08:58 +0000)
commiteb2dc3d3d076f6924b4d25f89de267dc93066ea5
tree042081fac5d6d633c1ac1fd3f3416734fffccc3c
parent137e4a6c63e8688cba34df7dad81b45f0aaa500c
all: remove strings.Contains check around Replace

It doesn't change the outcome. It might have been useful at some point
to avoid Replace from doing work or allocating. However, nowadays the
func returns early without doing any work if Count returns 0.

Change-Id: Id69dc74042a6e39672b405016484db8b50f43d58
Reviewed-on: https://go-review.googlesource.com/62991
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/path/filepath/path_windows.go
src/text/template/exec.go