mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-05 07:13:09 +00:00
Simplify
This commit is contained in:
parent
fca4c14e0c
commit
d82581244c
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user