mirror of
https://github.com/codex-storage/nim-libp2p.git
synced 2025-01-26 18:59:20 +00:00
avoid unnecesary temps
This commit is contained in:
parent
18b9765525
commit
0f3d024c0a
@ -77,13 +77,9 @@ proc decodeMsg*(buf: seq[byte]): IdentifyInfo =
|
||||
if pb.getBytes(4, observableAddr) > 0: # attempt to read the observed addr
|
||||
result.observedAddr = MultiAddress.init(observableAddr)
|
||||
|
||||
var protoVersion = ""
|
||||
discard pb.getString(5, protoVersion)
|
||||
result.protoVersion = protoVersion
|
||||
discard pb.getString(5, result.protoVersion)
|
||||
|
||||
var agentVersion = ""
|
||||
discard pb.getString(6, agentVersion)
|
||||
result.agentVersion = agentVersion
|
||||
discard pb.getString(6, result.agentVersion)
|
||||
|
||||
method init*(p: Identify) =
|
||||
proc handle(conn: Connection, proto: string) {.async, gcsafe.} =
|
||||
|
Loading…
x
Reference in New Issue
Block a user