From 276d8b9b1dd15f3c6fdf6c44f2bab35713a98b74 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Sat, 21 Apr 2018 11:45:28 +0300 Subject: Replace "seq[T]" with "List[T]" where suitable --- src/aur.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/aur.nim') diff --git a/src/aur.nim b/src/aur.nim index 42762f6..837dea7 100644 --- a/src/aur.nim +++ b/src/aur.nim @@ -1,5 +1,5 @@ import - future, json, options, re, sequtils, sets, strutils, tables, + future, json, lists, options, re, sequtils, sets, strutils, tables, package, utils, "wrapper/curl" @@ -180,13 +180,13 @@ proc downloadAurComments*(base: string): (seq[AurComment], Option[string]) = .replace(""", "\"") .replace("&", "&") - proc findAllMatches(start: int, found: seq[AurComment]): seq[AurComment] = + proc findAllMatches(start: int, found: List[AurComment]): List[AurComment] = var matches: array[3, string] let index = content.find(commentRe, matches, start) if index >= 0: - findAllMatches(index + 1, found & (matches[0].strip, matches[1].strip, - transformComment(matches[2]))) + findAllMatches(index + 1, (matches[0].strip, matches[1].strip, + transformComment(matches[2])) ^& found) else: found - (findAllMatches(0, @[]), none(string)) + (toSeq(findAllMatches(0, nil).reversed.items), none(string)) -- cgit v1.2.3-70-g09d2