]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix benchmark not building with changes to krpc.Msg.Token
authorMatt Joiner <anacrolix@gmail.com>
Mon, 21 Jan 2019 21:53:42 +0000 (22:53 +0100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 21 Jan 2019 21:53:42 +0000 (22:53 +0100)
bencode/bench_test.go

index c0b5224caebffe47ae7cdcf92f3093017118b266..168d0108fe0ca5f8ae524e71063a8985a9b721c9 100644 (file)
@@ -28,7 +28,7 @@ func BenchmarkMarshalThenUnmarshalKrpcMsg(tb *testing.B) {
                T: "420",
                Y: "r",
                R: &krpc.Return{
-                       Token: "re-up",
+                       Token: func() *string { t := "re-up"; return &t }(),
                },
                IP:       krpc.NodeAddr{IP: net.ParseIP("1.2.3.4"), Port: 1337},
                ReadOnly: true,