misc
This commit is contained in:
parent
c5c60ba9ff
commit
e8693b7b66
|
@ -11,19 +11,18 @@ type
|
|||
RandomChunker* = Chunker
|
||||
|
||||
proc new*(
|
||||
T: type RandomChunker,
|
||||
rng: Rng,
|
||||
chunkSize: int | NBytes,
|
||||
size: int | NBytes,
|
||||
pad = false
|
||||
): RandomChunker =
|
||||
T: type RandomChunker,
|
||||
rng: Rng,
|
||||
chunkSize: int | NBytes,
|
||||
size: int | NBytes,
|
||||
pad = false): RandomChunker =
|
||||
## Create a chunker that produces random data
|
||||
##
|
||||
|
||||
let
|
||||
size = size.int
|
||||
chunkSize = chunkSize.NBytes
|
||||
|
||||
|
||||
var consumed = 0
|
||||
proc reader(data: ChunkBuffer, len: int): Future[int]
|
||||
{.async, gcsafe, raises: [Defect].} =
|
||||
|
|
Loading…
Reference in New Issue