From cb63408d7d9de91020a7a815216b531fdf944b47 Mon Sep 17 00:00:00 2001 From: Benjamin Shirley-Quirk Date: Wed, 5 Aug 2020 01:44:55 +0100 Subject: removed listcomp.nim --- src/args.nim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/args.nim') diff --git a/src/args.nim b/src/args.nim index acf9604..b93d5fb 100644 --- a/src/args.nim +++ b/src/args.nim @@ -1,6 +1,6 @@ import options, os, posix, sequtils, sets, strutils, sugar, - utils, "listcomp" + utils type ArgumentType* {.pure.} = enum @@ -105,13 +105,12 @@ proc splitArgs*(params: seq[string], let consumedNext = argsResult.map(a => a.consumedNext).foldl(a or b) let newNext = next.filter(n => not consumedNext) when NimVersion >= "1.2": - let lc = collect(newSeq): + return((block:collect(newSeq): for x in argsResult: (x.key,x.value,ArgumentType.short) - return (lc, newNext, stdinConsumed, false) + ), newNext, stdinConsumed, false) else: - return (lc[(x.key, x.value, ArgumentType.short) | (x <- argsResult), Argument], - newNext, stdinConsumed, false) + return (lc[(x.key, x.value, ArgumentType.short) | (x <- argsResult), Argument], newNext, stdinConsumed, false) else: return (@[(current, none(string), ArgumentType.target)], next, stdinConsumed, false) -- cgit v1.2.3-70-g09d2