diff --git a/integration_test.go b/integration_test.go index f1530a01..38f375c6 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1770,7 +1770,7 @@ func BenchmarkMarshal_ReuseMsg(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { a := data[r.Intn(len(data))] - seg, err := msg.Reset(msg.Arena) + seg, err := msg.Reset(capnp.SingleSegment(nil)) if err != nil { b.Fatal(err) } diff --git a/message_test.go b/message_test.go index 5bd8448c..4d3289b3 100644 --- a/message_test.go +++ b/message_test.go @@ -646,11 +646,11 @@ var errReadOnlyArena = errors.New("Allocate called on read-only arena") func BenchmarkMessageGetFirstSegment(b *testing.B) { var msg Message - var arena Arena = SingleSegment(nil) b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { + arena := SingleSegment(nil) _, err := msg.Reset(arena) if err != nil { b.Fatal(err)