From c54e6d24b70f21293612449c7a960e64077c5f89 Mon Sep 17 00:00:00 2001 From: Benjamin Shirley-Quirk Date: Tue, 4 Aug 2020 23:45:21 +0100 Subject: refactored collect blocks --- src/main.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.nim') diff --git a/src/main.nim b/src/main.nim index af22bc0..458ba72 100644 --- a/src/main.nim +++ b/src/main.nim @@ -12,12 +12,11 @@ import proc execSudo*(args: seq[Argument]): int = when NimVersion >= "1.2": - execResult(sudoPrefix & getAppFilename() & - (block:collect(newSeq): + execResult(sudoPrefix & getAppFilename() & (block:collect(newSeq): for y in args: for x in y.collectArg: x - )) + )) else: execResult(sudoPrefix & getAppFilename() & lc[x | (y <- args, x <- y.collectArg), string]) -- cgit v1.2.3-70-g09d2