From f83d1b4da446f316f14053c017929a37afe29c52 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sat, 8 Jun 2019 08:37:58 +0300 Subject: [PATCH] Remove some unused symbols. --- chronos/streams/chunkstream.nim | 5 +---- chronos/transports/stream.nim | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/chronos/streams/chunkstream.nim b/chronos/streams/chunkstream.nim index 554c3ead..d7b817c8 100644 --- a/chronos/streams/chunkstream.nim +++ b/chronos/streams/chunkstream.nim @@ -30,9 +30,7 @@ proc oneOf*[A, B](fut1: Future[A], fut2: Future[B]): Future[void] = ## error, so you need to check `fut1` and `fut2` for error. var retFuture = newFuture[void]("chunked.oneOf()") proc cb(data: pointer) {.gcsafe.} = - var index: int if not retFuture.finished: - var fut = cast[FutureBase](data) if cast[pointer](fut1) == data: fut2.removeCallback(cb) elif cast[pointer](fut2) == data: @@ -185,8 +183,7 @@ proc chunkedWriteLoop(stream: AsyncStreamWriter) {.async.} = var wstream = cast[ChunkedStreamWriter](stream) var exitFut = wstream.exevent.wait() var buffer: array[16, byte] - var error: ref Exception - var wFut1, wFut2, wFut3: Future[void] + var wFut1, wFut2: Future[void] wstream.state = AsyncStreamState.Running while true: diff --git a/chronos/transports/stream.nim b/chronos/transports/stream.nim index 769a2a07..ab49dcbf 100644 --- a/chronos/transports/stream.nim +++ b/chronos/transports/stream.nim @@ -267,10 +267,6 @@ when defined(windows): template getFileHandle(v: untyped): Handle = cast[Handle]((v).buflen) - template slideBuffer(t, o: untyped) = - (t).wwsabuf.buf = cast[cstring](cast[uint]((t).wwsabuf.buf) + uint(o)) - (t).wwsabuf.len -= int32(o) - template setReaderWSABuffer(t: untyped) = (t).rwsabuf.buf = cast[cstring]( cast[uint](addr t.buffer[0]) + uint((t).roffset)) @@ -726,7 +722,6 @@ when defined(windows): proc acceptPipeLoop(udata: pointer) {.gcsafe, nimcall.} = var ovl = cast[PtrCustomOverlapped](udata) var server = cast[StreamServer](ovl.data.udata) - var loop = getGlobalDispatcher() while true: if server.apending: