From: Chris Duncan Date: Fri, 21 Aug 2026 21:50:54 +0000 (-0700) Subject: Reformat for const usage. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=40847c384bb27dc0097532c6440c93ed6ed23baa;p=nano25519.git Reformat for const usage. --- diff --git a/src/assembly/utils.ts b/src/assembly/utils.ts index bee890e..985c2cb 100644 --- a/src/assembly/utils.ts +++ b/src/assembly/utils.ts @@ -20,9 +20,8 @@ export function clamp (k: StaticArray): void { @inline export function equal (b: i8, c: i8): u8 { const x: u8 = u8(b) ^ u8(c) /* 0: yes; 1..255: no */ - let y: u32 = u32(x) /* 0: yes; 1..255: no */ - y-- - return u8(y >> 31) /* 1: yes; 0: no */ + const y: u32 = u32(x) /* 0: yes; 1..255: no */ + return u8((y - 1) >> 31) /* 1: yes; 0: no */ } //@ts-expect-error