mirror of
https://github.com/logos-storage/nim-libp2p.git
synced 2026-01-04 06:33:10 +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
|
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.} =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user