explicitly mention which `Success` enum to use (#5309)
In Nim 2.0 it can no longer infer that we mean `ResponseCode.Success` inside `eth2_network`. Explicitly refer to that type to work around.
This commit is contained in:
parent
072ec1f0d2
commit
8064f5bcce
|
@ -682,13 +682,13 @@ proc sendResponseChunkBytesSZ(
|
|||
contextBytes: openArray[byte] = []): Future[void] =
|
||||
inc response.writtenChunks
|
||||
response.stream.writeChunkSZ(
|
||||
some Success, uncompressedLen, payloadSZ, contextBytes)
|
||||
some ResponseCode.Success, uncompressedLen, payloadSZ, contextBytes)
|
||||
|
||||
proc sendResponseChunkBytes(
|
||||
response: UntypedResponse, payload: openArray[byte],
|
||||
contextBytes: openArray[byte] = []): Future[void] =
|
||||
inc response.writtenChunks
|
||||
response.stream.writeChunk(some Success, payload, contextBytes)
|
||||
response.stream.writeChunk(some ResponseCode.Success, payload, contextBytes)
|
||||
|
||||
proc sendResponseChunk(
|
||||
response: UntypedResponse, val: auto,
|
||||
|
@ -698,11 +698,11 @@ proc sendResponseChunk(
|
|||
template sendUserHandlerResultAsChunkImpl*(stream: Connection,
|
||||
handlerResultFut: Future): untyped =
|
||||
let handlerRes = await handlerResultFut
|
||||
writeChunk(stream, some Success, SSZ.encode(handlerRes))
|
||||
writeChunk(stream, some ResponseCode.Success, SSZ.encode(handlerRes))
|
||||
|
||||
template sendUserHandlerResultAsChunkImpl*(stream: Connection,
|
||||
handlerResult: auto): untyped =
|
||||
writeChunk(stream, some Success, SSZ.encode(handlerResult))
|
||||
writeChunk(stream, some ResponseCode.Success, SSZ.encode(handlerResult))
|
||||
|
||||
proc uncompressFramedStream(conn: Connection,
|
||||
expectedSize: int): Future[Result[seq[byte], cstring]]
|
||||
|
|
Loading…
Reference in New Issue