commit | d86ab015f7ec9a909ba278b154086585e2f15285 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Tue Oct 26 21:52:54 2010 -0700 |
committer | Russ Cox <rsc@golang.org> | Tue Oct 26 21:52:54 2010 -0700 |
tree | ffa2b26498007fda5785b2715089ee554e753a27 | |
parent | e48c0fb562e95f0011b45c8ab9c5f01d088c8e20 [diff] [blame] |
use copy R=gri CC=golang-dev https://golang.org/cl/2763041
diff --git a/src/pkg/bufio/bufio_test.go b/src/pkg/bufio/bufio_test.go index 753cf3e..ef91d94 100644 --- a/src/pkg/bufio/bufio_test.go +++ b/src/pkg/bufio/bufio_test.go
@@ -179,10 +179,7 @@ func (r *StringReader) Read(p []byte) (n int, err os.Error) { if r.step < len(r.data) { s := r.data[r.step] - for i := 0; i < len(s); i++ { - p[i] = s[i] - } - n = len(s) + n = copy(p, s) r.step++ } else { err = os.EOF