mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
changes &x -> x[0:] for array to slice conversion
R=gri CC=golang-dev https://golang.org/cl/1326042
This commit is contained in:
parent
7ee6d44e4f
commit
bb84f4b5d2
46 changed files with 95 additions and 95 deletions
|
|
@ -74,7 +74,7 @@ func (b *Buffer) grow(n int) int {
|
|||
if len(b.buf)+n > cap(b.buf) {
|
||||
var buf []byte
|
||||
if b.buf == nil && n <= len(b.bootstrap) {
|
||||
buf = &b.bootstrap
|
||||
buf = b.bootstrap[0:]
|
||||
} else {
|
||||
// not enough space anywhere
|
||||
buf = make([]byte, 2*cap(b.buf)+n)
|
||||
|
|
@ -181,7 +181,7 @@ func (b *Buffer) WriteRune(r int) (n int, err os.Error) {
|
|||
b.WriteByte(byte(r))
|
||||
return 1, nil
|
||||
}
|
||||
n = utf8.EncodeRune(r, &b.runeBytes)
|
||||
n = utf8.EncodeRune(r, b.runeBytes[0:])
|
||||
b.Write(b.runeBytes[0:n])
|
||||
return n, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue