mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-03-03 17:40:38 +00:00
Fix compilation on devel
This commit is contained in:
parent
abbeaab684
commit
7e4b69bfb2
@ -530,7 +530,7 @@ proc protoArgument*(ma: MultiAddress,
|
|||||||
err("multiaddress: Decoding protocol error")
|
err("multiaddress: Decoding protocol error")
|
||||||
else:
|
else:
|
||||||
ok(res)
|
ok(res)
|
||||||
elif proto.kind in {Length, Path}:
|
elif proto.kind in {MAKind.Length, Path}:
|
||||||
if vb.data.readSeq(buffer) == -1:
|
if vb.data.readSeq(buffer) == -1:
|
||||||
err("multiaddress: Decoding protocol error")
|
err("multiaddress: Decoding protocol error")
|
||||||
else:
|
else:
|
||||||
@ -575,7 +575,7 @@ proc getPart(ma: MultiAddress, index: int): MaResult[MultiAddress] =
|
|||||||
res.data.writeVarint(header)
|
res.data.writeVarint(header)
|
||||||
res.data.writeArray(data)
|
res.data.writeArray(data)
|
||||||
res.data.finish()
|
res.data.finish()
|
||||||
elif proto.kind in {Length, Path}:
|
elif proto.kind in {MAKind.Length, Path}:
|
||||||
if vb.data.readSeq(data) == -1:
|
if vb.data.readSeq(data) == -1:
|
||||||
return err("multiaddress: Decoding protocol error")
|
return err("multiaddress: Decoding protocol error")
|
||||||
|
|
||||||
@ -637,7 +637,7 @@ iterator items*(ma: MultiAddress): MaResult[MultiAddress] =
|
|||||||
|
|
||||||
res.data.writeVarint(header)
|
res.data.writeVarint(header)
|
||||||
res.data.writeArray(data)
|
res.data.writeArray(data)
|
||||||
elif proto.kind in {Length, Path}:
|
elif proto.kind in {MAKind.Length, Path}:
|
||||||
if vb.data.readSeq(data) == -1:
|
if vb.data.readSeq(data) == -1:
|
||||||
yield err(MaResult[MultiAddress], "Decoding protocol error")
|
yield err(MaResult[MultiAddress], "Decoding protocol error")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user