rm empty slice alloc
This commit is contained in:
parent
d57a6c23da
commit
d4b7c255c6
|
@ -175,7 +175,7 @@ func (t *tagTracer) nearFirstPeers(msg *Message) []peer.ID {
|
||||||
defer t.Unlock()
|
defer t.Unlock()
|
||||||
peersMap, ok := t.nearFirst[t.msgID(msg.Message)]
|
peersMap, ok := t.nearFirst[t.msgID(msg.Message)]
|
||||||
if !ok {
|
if !ok {
|
||||||
return []peer.ID{}
|
return nil
|
||||||
}
|
}
|
||||||
peers := make([]peer.ID, 0, len(peersMap))
|
peers := make([]peer.ID, 0, len(peersMap))
|
||||||
for p := range peersMap {
|
for p := range peersMap {
|
||||||
|
|
Loading…
Reference in New Issue