avoid unnecesary temps

This commit is contained in:
Dmitriy Ryajov 2019-08-31 13:12:49 -06:00
parent 18b9765525
commit 0f3d024c0a
1 changed files with 2 additions and 6 deletions

View File

@ -77,13 +77,9 @@ proc decodeMsg*(buf: seq[byte]): IdentifyInfo =
if pb.getBytes(4, observableAddr) > 0: # attempt to read the observed addr if pb.getBytes(4, observableAddr) > 0: # attempt to read the observed addr
result.observedAddr = MultiAddress.init(observableAddr) result.observedAddr = MultiAddress.init(observableAddr)
var protoVersion = "" discard pb.getString(5, result.protoVersion)
discard pb.getString(5, protoVersion)
result.protoVersion = protoVersion
var agentVersion = "" discard pb.getString(6, result.agentVersion)
discard pb.getString(6, agentVersion)
result.agentVersion = agentVersion
method init*(p: Identify) = method init*(p: Identify) =
proc handle(conn: Connection, proto: string) {.async, gcsafe.} = proc handle(conn: Connection, proto: string) {.async, gcsafe.} =