This has been unnecessary as long as rawNewObj has called zeroMem, (#8867)

and more recently indexing past the Nim-logical end has become
illegal making this line cause a crash.
This commit is contained in:
c-blake 2018-09-04 09:26:34 -04:00 • committed by Andreas Rumpf
commit cec89d8354

View file

@ -328,7 +328,6 @@ proc `$`*(ms: MemSlice): string {.inline.} =
## Return a Nim string built from a MemSlice.
var buf = newString(ms.size)
copyMem(addr(buf[0]), ms.data, ms.size)
buf[ms.size] = '\0'
result = buf
iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} =