--nilseqs is now a deprecated noop (#17211)

* --nilseqs is now a deprecated noop

* fix tests; fix: future => sugar
This commit is contained in:
Timothee Cour 2021-03-01 11:59:43 -08:00 • committed by GitHub
commit 6c5872c169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 37 additions and 53 deletions

View file

@ -140,7 +140,7 @@ let numbers = @[1, 2, 3, 4, 5, 6]
let odd = filter(numbers, proc (x: int): bool = x mod 2 != 0)
doAssert odd == @[1, 3, 5]
import sequtils, future
import sequtils, sugar
let numbers1 = @[1, 2, 3, 4, 5, 6]
let odd1 = filter(numbers1, (x: int) -> bool => x mod 2 != 0)
assert odd1 == @[1, 3, 5]
@ -149,7 +149,7 @@ proc isValid(x: int, validator: proc (x: int): bool) =
if validator(x): echo(x, " is valid")
else: echo(x, " is NOT valid")
import future
import sugar
proc isValid2(x: int, validator: (x: int) -> bool) =
if validator(x): echo(x, " is valid")
else: echo(x, " is NOT valid")
@ -193,7 +193,7 @@ doAssertRaises(IndexDefect):
block:
var list = newSeq[string](3)
assert list[0] == nil
assert list[0].len == 0
list[0] = "Foo"
list[1] = "Bar"
list[2] = "Baz"