From d82581244c3b9a1cb25497f1fcd4f5f17d116b3c Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Sat, 17 Apr 2021 19:25:33 +0200 Subject: [PATCH] Simplify --- testmodules/options/test.nim | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/testmodules/options/test.nim b/testmodules/options/test.nim index db9b6a4..92cb725 100644 --- a/testmodules/options/test.nim +++ b/testmodules/options/test.nim @@ -132,13 +132,10 @@ suite "optionals": test2() test "without statement evaluates optional expression only once": - proc test = - var count = 0 - without a =? (inc count; 42.some): - discard - check count == 1 - - test() + var count = 0 + without a =? (inc count; 42.some): + discard + check count == 1 test ".?[] can be used for indexing tables without raising KeyError": let table = @{"a": 1, "b": 2}.toTable