Remove unused unnamed second item in ranges

This commit is contained in:
Bryan Boreham committed 2015-03-26 18:04:57 +00:00
1 parent 15fdcae25a
commit 7a4a88aeb9
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -119,7 +119,7 @@ func (cm *ConnectionMaker) checkStateAndAttemptConnections() time.Duration {
}
// Add command-line targets that are not connected
for address, _ := range cm.cmdLineAddress {
for address := range cm.cmdLineAddress {
addTarget(address)
}
+2 -2
View File
@@ -107,7 +107,7 @@ func (peers *Peers) Names() PeerNameSet {
func (peers *Peers) EncodePeers(names PeerNameSet) []byte {
peers.RLock()
peerList := make([]*Peer, 0, len(names))
for name, _ := range names {
for name := range names {
if peer, found := peers.table[name]; found {
peerList = append(peerList, peer)
}
@@ -169,7 +169,7 @@ func (peers *Peers) garbageCollect() []*Peer {
func setFromPeersMap(peers map[PeerName]*Peer) PeerNameSet {
names := make(PeerNameSet)
for name, _ := range peers {
for name := range peers {
names[name] = true
}
return names
+1 -1
View File
@@ -377,7 +377,7 @@ func NewTopologyGossipData(peers *Peers, update ...*Peer) *TopologyGossipData {
}
func (d *TopologyGossipData) Merge(other GossipData) {
for name, _ := range other.(*TopologyGossipData).update {
for name := range other.(*TopologyGossipData).update {
d.update[name] = true
}
}