From eef5f705fb0352b88d7268e8121a93c349072f0b Mon Sep 17 00:00:00 2001 From: Peter Waller
Date: Fri, 11 Nov 2016 19:39:45 +0000 Subject: [PATCH] Remove commented code --- msgp/read.go | 3 +-- msgp/read_test.go | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/msgp/read.go b/msgp/read.go index 39195ef6..1cacd07e 100644 --- a/msgp/read.go +++ b/msgp/read.go @@ -169,7 +169,7 @@ func (m *Reader) CopyNext(w io.Writer) (int64, error) { // Fallthrough } else { // Intentional "else no error" branch due to fallthrough above. - // Otherwise, + // Just write the buffer. var nInt int nInt, err = w.Write(buf) n = int64(nInt) @@ -178,7 +178,6 @@ func (m *Reader) CopyNext(w io.Writer) (int64, error) { } else if n != int64(sz) { return n, io.ErrShortWrite } - } // for maps and slices, read elements diff --git a/msgp/read_test.go b/msgp/read_test.go index cb92dfac..711f6856 100644 --- a/msgp/read_test.go +++ b/msgp/read_test.go @@ -763,12 +763,6 @@ func TestCopyNext(t *testing.T) { n, buf.Len()) } - // p := make([]byte, 0, len(buf.Bytes())) - // n, err := de.ReadNext(p) - // if err != nil { - // t.Fatal(err) - // } - if !bytes.Equal(buf.Bytes(), w.Bytes()) { t.Fatalf("not equal! %v, %v", buf.Bytes(), w.Bytes()) }