diff options
Diffstat (limited to 'src/pacman.nim')
-rw-r--r-- | src/pacman.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pacman.nim b/src/pacman.nim index 1b9d2f9..f9fc978 100644 --- a/src/pacman.nim +++ b/src/pacman.nim @@ -301,15 +301,15 @@ proc checkConflicts*(args: seq[Argument], template full(s: string): OptionPair = table[s][0] when NimVersion >= "1.3.5": - (block:collect(newSeq): + optFirst: + collect(newSeq): for c in conflicts: if args.check(c.left.full): for w in c.right: if args.check(w.full): (c.left,w) - ).optFirst elif NimVersion >= "1.2": - (block: + optFirst: var tmp = newSeq[(string,string)]() for c in conflicts: if args.check(c.left.full): @@ -317,8 +317,6 @@ proc checkConflicts*(args: seq[Argument], if args.check(w.full): tmp.add((c.left,w)) tmp - ).optFirst - else: lc[(c.left, w) | (c <- conflicts, args.check(c.left.full), w <- c.right, args.check(w.full)), (string, string)].optFirst |