]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix peer_protocol benchmark
authorMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jan 2018 06:43:45 +0000 (17:43 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jan 2018 06:43:45 +0000 (17:43 +1100)
peer_protocol/decoder_test.go

index 0662e18122b4fd107f44ca95dca4efb71c884318..348f8247e67848eb92d6c7b93ebff6c3a022c974 100644 (file)
@@ -40,7 +40,8 @@ func BenchmarkDecodePieces(t *testing.B) {
                MaxLength: 1 << 18,
                Pool: &sync.Pool{
                        New: func() interface{} {
-                               return make([]byte, pieceLen)
+                               b := make([]byte, pieceLen)
+                               return &b
                        },
                },
        }