]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peer_protocol/decoder_test.go
Fix peer_protocol benchmark
[btrtrc.git] / 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
                        },
                },
        }