From 9b401994a16640892e3e643c52fa4ff00f4b9b3e Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 21 Jan 2020 18:50:50 +0200 Subject: [PATCH] Follow the convention of naming types as UpperCase --- json_rpc/router.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json_rpc/router.nim b/json_rpc/router.nim index 07ada9d..1b5c179 100644 --- a/json_rpc/router.nim +++ b/json_rpc/router.nim @@ -227,15 +227,15 @@ macro rpc*(server: RpcRouter, path: string, body: untyped): untyped = procBody = if body.kind == nnkStmtList: body else: body.body if parameters.hasReturnType: - let returnType = parameters[0] + let ReturnType = parameters[0] # delegate async proc allows return and setting of result as native type result.add quote do: - proc `doMain`(`paramsIdent`: JsonNode): Future[`returnType`] {.async.} = + proc `doMain`(`paramsIdent`: JsonNode): Future[`ReturnType`] {.async.} = `setup` `procBody` - if returnType == ident"JsonNode": + if ReturnType == ident"JsonNode": # `JsonNode` results don't need conversion result.add quote do: proc `procName`(`paramsIdent`: JsonNode): Future[JsonNode] {.async, gcsafe.} =