From 39d911be0c18a4c3bd785b1f18b2e6c9d58f482f Mon Sep 17 00:00:00 2001 From: Xie Yanbo Date: Sun, 23 Feb 2020 22:03:47 +0800 Subject: [PATCH] sugar not in nim 0.18.0 --- tests/test.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test.nim b/tests/test.nim index cc56d9a..15756bb 100644 --- a/tests/test.nim +++ b/tests/test.nim @@ -1,4 +1,4 @@ -import unittest, options, os, osproc, sequtils, strutils, sugar +import unittest, options, os, osproc, sequtils, strutils import leveldb, leveldbpkg/raw const @@ -20,7 +20,7 @@ proc execNimble(args: varargs[string]): tuple[output: string, exitCode: int] = quotedArgs.insert("-y") quotedArgs.insert("--nimbleDir:" & tmpNimbleDir) quotedArgs.insert("nimble") - quotedArgs = quotedArgs.map((x: string) => ("\"" & x & "\"")) + quotedArgs = quotedArgs.map(proc (x: string): string = "\"" & x & "\"") let cmd = quotedArgs.join(" ") result = execCmdEx(cmd) @@ -32,7 +32,7 @@ proc execTool(args: varargs[string]): tuple[output: string, exitCode: int] = quotedArgs.insert(tmpDbDir) quotedArgs.insert("--database") quotedArgs.insert(tmpNimbleDir / "bin" / "leveldb") - quotedArgs = quotedArgs.map((x: string) => ("\"" & x & "\"")) + quotedArgs = quotedArgs.map(proc (x: string): string = "\"" & x & "\"") if not existsDir(tmpDbDir): createDir(tmpDbDir)