From ce2dfa3ddd2b9f7fc7d2145772ca33c7ff592dd5 Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:36:47 +0200 Subject: [PATCH 1/2] chore: use nim version `2.2.0` --- .github/workflows/nim_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nim_test.yml b/.github/workflows/nim_test.yml index 47186570..3b1a33ce 100644 --- a/.github/workflows/nim_test.yml +++ b/.github/workflows/nim_test.yml @@ -20,7 +20,7 @@ jobs: - macos-latest - windows-latest nim-version: - - '2.0.8' + - '2.2.0' steps: - uses: actions/checkout@v4 From 9af047b7883c3b75f030ad4e6b308fb34d8b95f5 Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Sat, 15 Feb 2025 21:18:25 +0100 Subject: [PATCH 2/2] chore: use nim version `2.2.2` --- .github/workflows/nim_test.yml | 2 +- maths/modular_inverse.nim | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nim_test.yml b/.github/workflows/nim_test.yml index 3b1a33ce..ed16ec3f 100644 --- a/.github/workflows/nim_test.yml +++ b/.github/workflows/nim_test.yml @@ -20,7 +20,7 @@ jobs: - macos-latest - windows-latest nim-version: - - '2.2.0' + - '2.2.2' steps: - uses: actions/checkout@v4 diff --git a/maths/modular_inverse.nim b/maths/modular_inverse.nim index 234cb2ab..170c1dd6 100644 --- a/maths/modular_inverse.nim +++ b/maths/modular_inverse.nim @@ -56,15 +56,15 @@ when isMainModule: check modularInverse(tc.a, tc.modulus).get() == tc.inv test "No inverse when modulus is 1": - check modularInverse(0, 1).is_none() - check modularInverse(1, 1).is_none() - check modularInverse(-1, 1).is_none() + check modularInverse(0, 1).isNone() + check modularInverse(1, 1).isNone() + check modularInverse(-1, 1).isNone() test "No inverse when inputs are not co-prime": - check modularInverse(2, 4).is_none() - check modularInverse(-5, 25).is_none() - check modularInverse(0, 17).is_none() - check modularInverse(17, 17).is_none() + check modularInverse(2, 4).isNone() + check modularInverse(-5, 25).isNone() + check modularInverse(0, 17).isNone() + check modularInverse(17, 17).isNone() randomize() const randomTestSize = 10