From cbc69a69e6e39fed1601fbecb0e70b53c0da122d Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 17 Mar 2021 15:34:55 +0100 Subject: [PATCH] Fix compilation errors with Nim 1.2.6 --- nitro/basics/destination.nim | 4 ++-- nitro/basics/ethaddress.nim | 2 +- nitro/protocol/outcome.nim | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nitro/basics/destination.nim b/nitro/basics/destination.nim index 0bc6de2..f72f086 100644 --- a/nitro/basics/destination.nim +++ b/nitro/basics/destination.nim @@ -17,8 +17,8 @@ func `$`*(destination: Destination): string = func parse*(_: type Destination, s: string): ?Destination = Destination(array[32, byte].fromHex(s)).catch.option -func `==`*(a, b: Destination): bool {.borrow.} -func hash*(destination: Destination): Hash {.borrow.} +proc `==`*(a, b: Destination): bool {.borrow.} +proc hash*(destination: Destination): Hash {.borrow.} func toDestination*(address: EthAddress): Destination = var bytes: array[32, byte] diff --git a/nitro/basics/ethaddress.nim b/nitro/basics/ethaddress.nim index 15423f2..2e44b49 100644 --- a/nitro/basics/ethaddress.nim +++ b/nitro/basics/ethaddress.nim @@ -18,4 +18,4 @@ func `$`*(a: EthAddress): string = func parse*(_: type EthAddress, hex: string): ?EthAddress = EthAddress(array[20, byte].fromHex(hex)).catch.option -func `==`*(a, b: EthAddress): bool {.borrow.} +proc `==`*(a, b: EthAddress): bool {.borrow.} diff --git a/nitro/protocol/outcome.nim b/nitro/protocol/outcome.nim index 2b63737..ca30a6d 100644 --- a/nitro/protocol/outcome.nim +++ b/nitro/protocol/outcome.nim @@ -36,7 +36,7 @@ func init*(_: type Outcome, ) Outcome(@[assetOutcome]) -func `==`*(a, b: Allocation): bool {.borrow.} +proc `==`*(a, b: Allocation): bool {.borrow.} func `==`*(a, b: AssetOutcome): bool = if a.kind != b.kind: @@ -49,7 +49,7 @@ func `==`*(a, b: AssetOutcome): bool = of guaranteeType: a.guarantee == b.guarantee -func `==`*(a, b: Outcome): bool {.borrow.} +proc `==`*(a, b: Outcome): bool {.borrow.} func encode*(encoder: var AbiEncoder, guarantee: Guarantee) = encoder.startTuple()