Remove the "found" return value from Peers Fetch method

Callers can simply check whether the returned *Peer is nil.
This commit is contained in:
David Wragg authored and Matthias Radestock committed 2015-07-08 09:06:33 +01:00
1 parent 5e10b901a3
commit e50b1f1fe7
5 files changed
+10 -14

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ func (peers *Peers) AddTestRemoteConnection(p1, p2 *Peer) {
func (peers *Peers) DeleteTestConnection(p *Peer) {
toName := p.Name
toPeer, _ := peers.Fetch(toName)
toPeer := peers.Fetch(toName)
peers.Dereference(toPeer)
conn, _ := peers.ourself.ConnectionTo(toName)
peers.ourself.deleteConnection(conn)