sugar not in nim 0.18.0

This commit is contained in:
Xie Yanbo 2020-02-23 22:03:47 +08:00
parent 75ab9bbb47
commit 39d911be0c
1 changed files with 3 additions and 3 deletions

View File

@ -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)