mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
This commit is contained in:
@@ -5,7 +5,6 @@ proc `$`*(x: int): string {.magic: "IntToStr", noSideEffect.}
|
||||
|
||||
when defined(js):
|
||||
import std/private/since
|
||||
|
||||
since (1, 3):
|
||||
proc `$`*(x: uint): string =
|
||||
## Caveat: currently implemented as $(cast[int](x)), tied to current
|
||||
|
||||
@@ -378,7 +378,8 @@ proc reportUnhandledErrorAux(e: ref Exception) {.nodestroy.} =
|
||||
# ugly, but avoids heap allocations :-)
|
||||
template xadd(buf, s, slen) =
|
||||
if L + slen < high(buf):
|
||||
copyMem(addr(buf[L]), cstring(s), slen)
|
||||
|
||||
copyMem(addr(buf[L]), (when s is cstring: s else: cstring(s)), slen)
|
||||
inc L, slen
|
||||
template add(buf, s) =
|
||||
xadd(buf, s, s.len)
|
||||
|
||||
Reference in New Issue
Block a user