Normalise nimble (#36)
* normalise nimble file, ci / deprecation fixes * other deprecations
This commit is contained in:
parent
6112432b3a
commit
5ec974ed1a
8 changed files with 42 additions and 48 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import
|
||||
deques,
|
||||
stew/[ptrops, ranges/ptr_arith],
|
||||
stew/ptrops,
|
||||
async_backend
|
||||
|
||||
export
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import
|
||||
os, memfiles, options,
|
||||
stew/[ptrops, ranges/ptr_arith],
|
||||
stew/[ptrops],
|
||||
async_backend, buffers
|
||||
|
||||
export
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import
|
||||
deques, typetraits,
|
||||
stew/[ptrops, strings, ranges/ptr_arith],
|
||||
stew/[ptrops, strings],
|
||||
buffers, async_backend
|
||||
|
||||
export
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ const
|
|||
NewLines* = {'\r', '\n'}
|
||||
Digits* = {'0'..'9'}
|
||||
|
||||
proc readLine*(s: InputStream, keepEol = false): TaintedString {.fsMultiSync.} =
|
||||
proc readLine*(s: InputStream, keepEol = false): string {.fsMultiSync.} =
|
||||
fsAssert readableNow(s)
|
||||
|
||||
while s.readable:
|
||||
|
|
@ -145,7 +145,7 @@ proc readLine*(s: InputStream, keepEol = false): TaintedString {.fsMultiSync.} =
|
|||
result.add s.read.char
|
||||
|
||||
proc readUntil*(s: InputStream,
|
||||
sep: openArray[char]): Option[TaintedString] =
|
||||
sep: openArray[char]): Option[string] =
|
||||
fsAssert readableNow(s)
|
||||
var res = ""
|
||||
while s.readable(sep.len):
|
||||
|
|
@ -153,14 +153,14 @@ proc readUntil*(s: InputStream,
|
|||
return some(res)
|
||||
res.add s.read.char
|
||||
|
||||
template nextLine*(sp: InputStream, keepEol = false): Option[TaintedString] =
|
||||
template nextLine*(sp: InputStream, keepEol = false): Option[string] =
|
||||
let s = sp
|
||||
if s.readable:
|
||||
some readLine(s, keepEol)
|
||||
else:
|
||||
none string
|
||||
|
||||
iterator lines*(s: InputStream, keepEol = false): TaintedString =
|
||||
iterator lines*(s: InputStream, keepEol = false): string =
|
||||
while s.readable:
|
||||
yield readLine(s, keepEol)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue