Fix chunkedstream documentation.

Remove unnecessary asserts.
This commit is contained in:
cheatfate 2019-06-12 18:26:20 +03:00
parent f83d1b4da4
commit 5d4338d294
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ type
udata: pointer
future: Future[void]
AsyncStream* = ref object of RootRef
AsyncStream* = object of RootObj
reader*: AsyncStreamReader
writer*: AsyncStreamWriter
@ -115,7 +115,6 @@ proc `[]`*(sb: AsyncBuffer, index: int): byte {.inline.} =
result = sb.buffer[index]
proc update*(sb: var AsyncBuffer, size: int) {.inline.} =
doAssert(sb.offset + size < len(sb.buffer))
sb.offset += size
proc wait*(sb: var AsyncBuffer): Future[void] =
@ -140,7 +139,6 @@ proc shift*(sb: var AsyncBuffer, size: int) {.inline.} =
sb.offset = 0
proc copyData*(sb: AsyncBuffer, dest: pointer, offset, length: int) {.inline.} =
doAssert(length <= sb.dataLen())
copyMem(cast[pointer](cast[uint](dest) + cast[uint](offset)),
unsafeAddr sb.buffer[0], length)

View File

@ -6,6 +6,8 @@
# Licensed under either of
# Apache License, version 2.0, (LICENSE-APACHEv2)
# MIT license (LICENSE-MIT)
## This module implements HTTP/1.1 chunked-encoded stream reading and writing.
import ../asyncloop, ../timer
import asyncstream, ../transports/stream, ../transports/common
export asyncstream, stream, timer, common