mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
093493c6a5
commit
e70cedfaec
22 changed files with 147 additions and 218 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue