avoid wrapping in several futures

This commit is contained in:
Dmitriy Ryajov 2019-09-06 00:53:29 -06:00
parent 13837619ed
commit 962f58b436
1 changed files with 6 additions and 6 deletions

View File

@ -232,8 +232,8 @@ method readUntil*(s: BufferStream,
method write*(s: BufferStream, method write*(s: BufferStream,
pbytes: pointer, pbytes: pointer,
nbytes: int) nbytes: int): Future[void]
{.async, gcsafe.} = {.gcsafe.} =
## Consume (discard) all bytes (n <= 0) or ``n`` bytes from read-only stream ## Consume (discard) all bytes (n <= 0) or ``n`` bytes from read-only stream
## ``rstream``. ## ``rstream``.
## ##
@ -244,8 +244,8 @@ method write*(s: BufferStream,
method write*(s: BufferStream, method write*(s: BufferStream,
msg: string, msg: string,
msglen = -1) msglen = -1): Future[void]
{.async, gcsafe.} = {.gcsafe.} =
## Write string ``sbytes`` of length ``msglen`` to writer stream ``wstream``. ## Write string ``sbytes`` of length ``msglen`` to writer stream ``wstream``.
## ##
## String ``sbytes`` must not be zero-length. ## String ``sbytes`` must not be zero-length.
@ -259,8 +259,8 @@ method write*(s: BufferStream,
method write*(s: BufferStream, method write*(s: BufferStream,
msg: seq[byte], msg: seq[byte],
msglen = -1) msglen = -1): Future[void]
{.async, gcsafe.} = {.gcsafe.} =
## Write sequence of bytes ``sbytes`` of length ``msglen`` to writer ## Write sequence of bytes ``sbytes`` of length ``msglen`` to writer
## stream ``wstream``. ## stream ``wstream``.
## ##