Compatibility with newer nim

This commit is contained in:
Yuriy Glukhov 2018-08-29 12:19:17 +03:00 committed by zah
parent 4b5cda9233
commit 2c3a183445

View File

@ -321,7 +321,6 @@ proc registerMsg(protocol: var ProtocolInfo,
proc registerProtocol(protocol: ProtocolInfo) =
# TODO: This can be done at compile-time in the future
if protocol.version > 0:
if gProtocols.isNil: gProtocols = @[]
let pos = lowerBound(gProtocols, protocol)
gProtocols.insert(protocol, pos)
for i in 0 ..< gProtocols.len: