remove bytes.Copy

replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
This commit is contained in:
Rob Pike 2009-11-18 15:24:24 -08:00
parent 093493c6a5
commit e70cedfaec
22 changed files with 147 additions and 218 deletions

View file

@ -10,7 +10,6 @@ package tls
// state, or for a notification when the state changes.
import (
"bytes";
"container/list";
"crypto/subtle";
"hash";
@ -228,8 +227,8 @@ func (p *recordProcessor) processHandshakeRecord(data []byte) {
return;
}
newBuf := make([]byte, len(p.handshakeBuf)+len(data));
bytes.Copy(newBuf, p.handshakeBuf);
bytes.Copy(newBuf[len(p.handshakeBuf):len(newBuf)], data);
copy(newBuf, p.handshakeBuf);
copy(newBuf[len(p.handshakeBuf):len(newBuf)], data);
p.handshakeBuf = newBuf;
}