From 06b759e0499402db7be9d62c63d12a447035e7f4 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 25 Sep 2019 13:24:09 -0600 Subject: [PATCH] review cleanup --- examples/directchat.nim | 2 +- libp2p/wire.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/directchat.nim b/examples/directchat.nim index 2ffed9048..eddc2a4ba 100644 --- a/examples/directchat.nim +++ b/examples/directchat.nim @@ -63,7 +63,7 @@ proc readAndPrint(p: ChatProto) {.async, gcsafe.} = proc dialPeer(p: ChatProto, address: string) {.async, gcsafe.} = var parts = address.split("/") - if parts.len == 11 and parts[^2] != "ipfs" and parts[^2] != "p2p": + if parts.len == 11 and parts[^2] notin ["ipfs", "p2p"]: quit("invalid or incompelete peerId") var remotePeer: PeerInfo diff --git a/libp2p/wire.nim b/libp2p/wire.nim index 7c4a325de..511286aab 100644 --- a/libp2p/wire.nim +++ b/libp2p/wire.nim @@ -142,7 +142,7 @@ proc getLocalAddress*(sock: AsyncFD): TransportAddress = fromSAddr(addr saddr, slen, result) proc toMultiAddr*(address: TransportAddress): MultiAddress = - ## Returns string representation of ``address``. + ## Returns a multiaddr of ``address``. case address.family of AddressFamily.IPv4: var a = IpAddress(