Fix compilation error on nim 1.4 (#723)

This commit is contained in:
lchenut 2022-05-27 12:51:56 +02:00 committed by GitHub
parent ca3f4e8701
commit 36f3132d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -39,8 +39,7 @@ func shortLog*(pid: PeerId): string =
if len(spid) > 10: if len(spid) > 10:
spid[3] = '*' spid[3] = '*'
# reminder to remove this once we stop supporting 1.2 when (NimMajor, NimMinor) > (1, 4):
when (NimMajor, NimMinor) > (1, 2):
spid.delete(4 .. spid.high - 6) spid.delete(4 .. spid.high - 6)
else: else:
spid.delete(4, spid.high - 6) spid.delete(4, spid.high - 6)