Skip to content

Commit

Permalink
assert() -> doAssert()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantalpalaru committed Mar 14, 2019
1 parent 98e334f commit e477bc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chronicles/log_output.nim
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ proc open*(o: var FileOutput, path: string, mode = fmAppend): bool =
o.mode = mode

proc openOutput(o: var FileOutput) =
assert o.outPath.len > 0 and o.mode != fmRead
doAssert o.outPath.len > 0 and o.mode != fmRead
createDir o.outPath.splitFile.dir
o.outFile = open(o.outPath, o.mode)

Expand Down Expand Up @@ -232,7 +232,7 @@ template append*(o: var FileOutput, s: string) =
template flushOutput*(o: var FileOutput) =
# XXX: Uncommenting this triggers a strange compile-time error
# when multiple sinks are used.
# assert o.outFile != nil
# doAssert o.outFile != nil
o.outFile.flushFile

template append*(o: var StdOutOutput, s: string) = stdout.write s
Expand Down
2 changes: 1 addition & 1 deletion chronicles/scope_helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ proc lastScopeBody*(scopes: NimNode): NimNode =
result = lastScopeBody(scopes[^1])
of {nnkClosedSymChoice, nnkOpenSymChoice}:
var bestScopeRev = 0
assert scopes.len > 0
doAssert scopes.len > 0
for scope in scopes:
let scopeBody = scope.getImpl.body
let rev = scopeBody.scopeRevision
Expand Down

0 comments on commit e477bc2

Please sign in to comment.