aboutsummaryrefslogtreecommitdiff
path: root/src/feature/syncinfo.nim
diff options
context:
space:
mode:
authorBenjamin Shirley-Quirk2020-08-04 22:45:21 +0000
committerBenjamin Shirley-Quirk2020-08-04 22:45:21 +0000
commitc54e6d24b70f21293612449c7a960e64077c5f89 (patch)
tree68d3b8bc1b7aacd2f622ceedb240be9e99300b82 /src/feature/syncinfo.nim
parentb8d35dea8fb61ec177ab898b70404338f2ed477b (diff)
refactored collect blocks
Diffstat (limited to 'src/feature/syncinfo.nim')
-rw-r--r--src/feature/syncinfo.nim9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/feature/syncinfo.nim b/src/feature/syncinfo.nim
index 9dd1331..6b2278d 100644
--- a/src/feature/syncinfo.nim
+++ b/src/feature/syncinfo.nim
@@ -132,11 +132,10 @@ proc handleSyncInfo*(args: seq[Argument], config: Config): int =
let pkgInfosTable = pkgInfos.map(i => (i.rpc.toPackageReference, i)).toTable
when NimVersion >= "1.2":
- let codes = block:
- let tmp = collect(newSeq):
- for x in fullTargets:
- handleTarget(config, padding, finalArgs, x, x.rpcInfo.map(i => pkgInfosTable.opt(i.toPackageReference)).flatten)
- code & tmp
+ let codes = code & (block:collect(newSeq):
+ for x in fullTargets:
+ handleTarget(config, padding, finalArgs, x, x.rpcInfo.map(i => pkgInfosTable.opt(i.toPackageReference)).flatten)
+ )
else:
let codes = code & lc[handleTarget(config, padding, finalArgs, x,
x.rpcInfo.map(i => pkgInfosTable.opt(i.toPackageReference)).flatten) |