diff --git a/connection_test.go b/connection_test.go index a50eeff6..ffc48200 100644 --- a/connection_test.go +++ b/connection_test.go @@ -130,7 +130,7 @@ func BenchmarkConnectionMainReadLoop(b *testing.B) { // The chunk must be written to storage everytime, to ensure the // writeSem is unlocked. t.pieces[0].dirtyChunks.Clear() - cn.validReceiveChunks = map[request]struct{}{newRequestFromMessage(&msg): struct{}{}} + cn.validReceiveChunks = map[request]struct{}{newRequestFromMessage(&msg): {}} cl.unlock() n, err := w.Write(wb) require.NoError(b, err) diff --git a/metainfo/metainfo.go b/metainfo/metainfo.go index 62b6be19..9f628fe0 100644 --- a/metainfo/metainfo.go +++ b/metainfo/metainfo.go @@ -81,7 +81,7 @@ func (mi *MetaInfo) UpvertedAnnounceList() AnnounceList { return mi.AnnounceList } if mi.Announce != "" { - return [][]string{[]string{mi.Announce}} + return [][]string{{mi.Announce}} } return nil }