From a17cad710c94b43af394a0e7d41013bf5e9e6093 Mon Sep 17 00:00:00 2001 From: Ludovic Chenut Date: Fri, 9 Dec 2022 17:23:33 +0100 Subject: [PATCH] Fix devel 32bits (#818) --- libp2p/varint.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libp2p/varint.nim b/libp2p/varint.nim index e881a317a..2d82f26c5 100644 --- a/libp2p/varint.nim +++ b/libp2p/varint.nim @@ -58,10 +58,7 @@ type SomeVarint* = PBSomeVarint | LPSomeVarint SomeUVarint* = PBSomeUVarint | LPSomeUVarint -template toUleb(x: uint64): uint64 = x -template toUleb(x: uint32): uint32 = x -template toUleb(x: uint16): uint16 = x -template toUleb(x: uint8): uint8 = x +template toUleb[T: uint64|uint32|uint16|uint8|uint](x: T): T = x func toUleb(x: zint64): uint64 = let v = cast[uint64](x)