aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/bytes/buffer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/bytes/buffer_test.go')
-rw-r--r--src/pkg/bytes/buffer_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/bytes/buffer_test.go b/src/pkg/bytes/buffer_test.go
index e11eb5b1cc..d4862459d5 100644
--- a/src/pkg/bytes/buffer_test.go
+++ b/src/pkg/bytes/buffer_test.go
@@ -111,7 +111,7 @@ func empty(t *testing.T, testname string, buf *Buffer, s string, fub []byte) {
if err != nil {
t.Errorf(testname+" (empty 2): err should always be nil, found err == %s\n", err)
}
- s = s[n:len(s)];
+ s = s[n:];
check(t, testname+" (empty 3)", buf, s);
}
@@ -228,7 +228,7 @@ func TestMixedReadsAndWrites(t *testing.T) {
rlen := rand.Intn(len(data));
fub := make([]byte, rlen);
n, _ := buf.Read(fub);
- s = s[n:len(s)];
+ s = s[n:];
}
empty(t, "TestMixedReadsAndWrites (2)", &buf, s, make([]byte, buf.Len()));
}