We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28df4de commit 0f35442Copy full SHA for 0f35442
tools/nimdigger.nim
@@ -142,12 +142,11 @@ macro ctor(obj: untyped, a: varargs[untyped]): untyped =
142
143
proc parseKeyVal(a: string): OrderedTable[string, string] =
144
## parse bash-like entries of the form key=val
145
- let a2 = a.splitLines
146
- for i, ai in a2:
+ for ai in a.splitLines:
147
if ai.len == 0 or ai.startsWith "#": continue
148
- let b = split(ai, "=", maxsplit = 1)
149
- doAssert b.len == 2, $(ai, b)
150
- result[b[0]] = b[1]
+ let kv = split(ai, "=", maxsplit = 1)
+ doAssert kv.len == 2, $(ai, kv)
+ result[kv[0]] = kv[1]
151
152
# xxx move some of these to std/private/gitutils.nim
153
proc gitClone(url: string, dir: string) = runCmd fmt"git clone -q {url.quoteShell} {dir.quoteShell}"
0 commit comments