Normalise nimble (#36)

* normalise nimble file, ci / deprecation fixes

* other deprecations
This commit is contained in:
Jacek Sieka 2022-11-23 16:27:20 +01:00 • committed by GitHub
commit 5ec974ed1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 48 deletions

View file

@ -1,6 +1,6 @@
import
deques,
stew/[ptrops, ranges/ptr_arith],
stew/ptrops,
async_backend
export

View file

@ -1,6 +1,6 @@
import
os, memfiles, options,
stew/[ptrops, ranges/ptr_arith],
stew/[ptrops],
async_backend, buffers
export

View file

@ -8,7 +8,7 @@
import
deques, typetraits,
stew/[ptrops, strings, ranges/ptr_arith],
stew/[ptrops, strings],
buffers, async_backend
export

View file

@ -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)