From 7f0627378c1948ccae570336db137f712f3d4089 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sun, 1 Sep 2019 15:52:02 -0600 Subject: [PATCH] misc --- libp2p/identify.nim | 2 +- tests/testmultistream.nim | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libp2p/identify.nim b/libp2p/identify.nim index c159bf68b..83464afba 100644 --- a/libp2p/identify.nim +++ b/libp2p/identify.nim @@ -70,7 +70,7 @@ proc decodeMsg*(buf: seq[byte]): IdentifyInfo = var proto = "" while pb.getString(3, proto) > 0: result.protos.add(proto) - proto = "" # TODO: do i need to clear it up? + proto = "" var observableAddr = newSeq[byte]() if pb.getBytes(4, observableAddr) > 0: # attempt to read the observed addr diff --git a/tests/testmultistream.nim b/tests/testmultistream.nim index d2ac2926e..b09837f05 100644 --- a/tests/testmultistream.nim +++ b/tests/testmultistream.nim @@ -55,7 +55,8 @@ type method readExactly*(s: TestLsStream, pbytes: pointer, - nbytes: int): Future[void] {.async, gcsafe.} = + nbytes: int): + Future[void] {.async, gcsafe.} = case s.step: of 1: var buf = newSeq[byte](1) @@ -101,7 +102,8 @@ type method readExactly*(s: TestNaStream, pbytes: pointer, - nbytes: int): Future[void] {.async, gcsafe.} = + nbytes: int): + Future[void] {.async, gcsafe.} = case s.step: of 1: var buf = newSeq[byte](1)