From 0cdbed1dc25d674f040ed5586c4848a37e16adfd Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 24 Oct 2023 13:55:04 +0200 Subject: [PATCH] Remove trailing whitespace --- poseidon2.nim | 8 ++++---- poseidon2/types.nim | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poseidon2.nim b/poseidon2.nim index bb6203d..c7e94e1 100644 --- a/poseidon2.nim +++ b/poseidon2.nim @@ -36,7 +36,7 @@ proc internal_round(j: int; x, y, z: var F) = sbox(x) var s = x ; s += y ; s += z double(z) - x += s + x += s y += s z += s @@ -73,7 +73,7 @@ proc compress*(a, b : F) : F = perm_inplace(x, y, z) return x -proc merkle_root*(xs: openArray[F]) : F = +proc merkle_root*(xs: openArray[F]) : F = let a = low(xs) let b = high(xs) let m = b-a+1 @@ -85,7 +85,7 @@ proc merkle_root*(xs: openArray[F]) : F = let halfn : int = m div 2 let n : int = 2*halfn let is_odd : bool = (n != m) - + var ys : seq[F] = newSeq[F](halfn) if not is_odd: @@ -101,6 +101,6 @@ proc merkle_root*(xs: openArray[F]) : F = return merkle_root(ys) #------------------------------------------------------------------------------- - + diff --git a/poseidon2/types.nim b/poseidon2/types.nim index bdc9114..c8b5145 100644 --- a/poseidon2/types.nim +++ b/poseidon2/types.nim @@ -17,17 +17,17 @@ func getZero*() : F = setZero(z) return z -func toF*(a: int) : F = +func toF*(a: int) : F = var y : F fromInt(y, a); return y -func hexToF*(s : string) : F = +func hexToF*(s : string) : F = var y : F fromHex(y, s) return y -func arrayFromHex*[N]( inp: array[N, string]) : array[N, F] = +func arrayFromHex*[N]( inp: array[N, string]) : array[N, F] = var tmp : array[N, F] for i in low(inp)..high(inp): tmp[i] = hexToF( inp[i] )