mirror of https://github.com/vacp2p/nim-libp2p.git
Fix compilation error on nim 1.4 (#723)
This commit is contained in:
parent
ca3f4e8701
commit
36f3132d9a
|
@ -39,8 +39,7 @@ func shortLog*(pid: PeerId): string =
|
|||
if len(spid) > 10:
|
||||
spid[3] = '*'
|
||||
|
||||
# reminder to remove this once we stop supporting 1.2
|
||||
when (NimMajor, NimMinor) > (1, 2):
|
||||
when (NimMajor, NimMinor) > (1, 4):
|
||||
spid.delete(4 .. spid.high - 6)
|
||||
else:
|
||||
spid.delete(4, spid.high - 6)
|
||||
|
|
Loading…
Reference in New Issue