gofmt simplify

This commit is contained in:
Matt Joiner 2019-08-19 12:15:54 +10:00
parent fb8c549e9d
commit dfcb852487
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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
}