Make sequtils.zip return seq of anonymous tuples (#12575)

* Make sequtils.zip return seq of anonymous tuples

Earlier the tuples had named fields "a" and "b" and that made it
difficult to assign the zip returned seqs to other vars which expected
seqs of tuples with field names other than "a" and "b".

* Make sequtils.zip backwards compatible with Nim 1.0.x
This commit is contained in:
Kaushal Modi 2019-11-04 15:11:43 -05:00 • committed by Andreas Rumpf
commit b24560a140
3 changed files with 66 additions and 42 deletions

View file

@ -471,7 +471,7 @@ proc build_help*(expected: seq[Tparameter_specification] = @[],
let width = prefixes.map(proc (x: string): int = 3 + len(x)).max
for line in zip(prefixes, helps):
result.add(line.a & spaces(width - line.a.len) & line.b)
result.add(line[0] & spaces(width - line[0].len) & line[1])
proc echo_help*(expected: seq[Tparameter_specification] = @[],