diff options
| author | Russ Cox <rsc@golang.org> | 2009-11-20 11:45:05 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-11-20 11:45:05 -0800 |
| commit | c861f30835090bbd6b9b35a80667f26952843767 (patch) | |
| tree | 645bd57ef3c9326ec02e646a751b9075d12a79e7 /src/pkg/encoding/ascii85/ascii85.go | |
| parent | 7089e97992d5d6be520dfea787200061992526c8 (diff) | |
| download | golang-c861f30835090bbd6b9b35a80667f26952843767.tar.gz | |
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
http://codereview.appspot.com/156115
Diffstat (limited to 'src/pkg/encoding/ascii85/ascii85.go')
| -rw-r--r-- | src/pkg/encoding/ascii85/ascii85.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/encoding/ascii85/ascii85.go b/src/pkg/encoding/ascii85/ascii85.go index ba70f3dea..85f688b2f 100644 --- a/src/pkg/encoding/ascii85/ascii85.go +++ b/src/pkg/encoding/ascii85/ascii85.go @@ -57,7 +57,7 @@ func Encode(dst, src []byte) int { // Special case: zero (!!!!!) shortens to z. if v == 0 && len(src) >= 4 { dst[0] = 'z'; - dst = dst[1:len(dst)]; + dst = dst[1:]; n++; continue; } @@ -74,9 +74,9 @@ func Encode(dst, src []byte) int { m -= 4 - len(src); src = nil; } else { - src = src[4:len(src)] + src = src[4:] } - dst = dst[m:len(dst)]; + dst = dst[m:]; n += m; } return n; @@ -113,7 +113,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) { e.nbuf++; } n += i; - p = p[i:len(p)]; + p = p[i:]; if e.nbuf < 4 { return } @@ -138,7 +138,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) { } } n += nn; - p = p[nn:len(p)]; + p = p[nn:]; } // Trailing fringe. @@ -268,7 +268,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { // Copy leftover output from last decode. if len(d.out) > 0 { n = copy(p, d.out); - d.out = d.out[n:len(d.out)]; + d.out = d.out[n:]; return; } @@ -293,7 +293,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { } // Read more data. - nn, d.readErr = d.r.Read(d.buf[d.nbuf:len(d.buf)]); + nn, d.readErr = d.r.Read(d.buf[d.nbuf:]); d.nbuf += nn; } panic("unreachable"); |
