fixes broken test
This commit is contained in:
parent
92205d608b
commit
91d119fdb0
3 changed files with 12 additions and 4 deletions
|
|
@ -789,7 +789,7 @@ proc readInto*(s: InputStream, target: var openarray[byte]): bool =
|
|||
s.readIntoEx(target) == target.len
|
||||
|
||||
template readIntoEx*(sp: AsyncInputStream, dst: var openarray[byte]): int =
|
||||
let s = sp
|
||||
let s = InputStream(sp)
|
||||
# BEWARE! `openArrayToPair` here is needed to avoid
|
||||
# double evaluation of the `dst` expression:
|
||||
let (dstAddr, dstLen) = openArrayToPair(dst)
|
||||
|
|
@ -806,7 +806,7 @@ template readInto*(sp: AsyncInputStream, dst: var openarray[byte]): bool =
|
|||
## the expression will complete immediately.
|
||||
## Otherwise, it will await more bytes to become available.
|
||||
|
||||
let s = sp
|
||||
let s = InputStream(sp)
|
||||
# BEWARE! `openArrayToPair` here is needed to avoid
|
||||
# double evaluation of the `dst` expression:
|
||||
let (dstAddr, dstLen) = openArrayToPair(dst)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue