diff options
author | Russ Cox <rsc@golang.org> | 2009-09-15 09:41:59 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-15 09:41:59 -0700 |
commit | 0ebfa231d21b255d84cfdb8a618cfe397db6c497 (patch) | |
tree | 46eac6aefe26f0b9056bff646d960bcba3d076cf /src/pkg/regexp/regexp.go | |
parent | c67478eb2cfefebf09d0c648efa24bb9578078ba (diff) | |
download | golang-0ebfa231d21b255d84cfdb8a618cfe397db6c497.tar.gz |
more "declared and not used".
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r-- | src/pkg/regexp/regexp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index b378a669c..b1baf67c7 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -868,7 +868,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); + _, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { @@ -912,7 +912,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRune(src[searchPos:len(src)]); + _, width := utf8.DecodeRune(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { |