From 391051631f6118f60751735160d4f5a4b41ba5db Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 18 Nov 2009 15:24:24 -0800 Subject: remove bytes.Copy replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073 --- src/pkg/encoding/git85/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/encoding/git85/git.go') diff --git a/src/pkg/encoding/git85/git.go b/src/pkg/encoding/git85/git.go index 288fd748c..cbc78fc3c 100644 --- a/src/pkg/encoding/git85/git.go +++ b/src/pkg/encoding/git85/git.go @@ -241,7 +241,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { for { // Copy leftover output from last decode. if len(d.out) > 0 { - n = bytes.Copy(p, d.out); + n = copy(p, d.out); d.out = d.out[n:len(d.out)]; return; } @@ -270,7 +270,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { d.err = CorruptInputError(int64(e) + d.off) } d.out = d.outbuf[0:nn]; - d.nbuf = bytes.Copy(&d.buf, d.buf[nl+1:d.nbuf]); + d.nbuf = copy(&d.buf, d.buf[nl+1:d.nbuf]); d.off += int64(nl + 1); } panic("unreacahable"); -- cgit v1.2.3