From 179a6f602444c7d1fd641876fc3ae9162d4b7116 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Tue, 5 Jun 2018 11:12:55 +0100 Subject: [PATCH] Remove concatenation --- eth-rpc/server/asyncutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth-rpc/server/asyncutils.nim b/eth-rpc/server/asyncutils.nim index e67f98f..49382ea 100644 --- a/eth-rpc/server/asyncutils.nim +++ b/eth-rpc/server/asyncutils.nim @@ -6,7 +6,7 @@ proc wrapReply*(id: JsonNode, value: JsonNode, error: JsonNode): JsonNode = proc sendError*(client: AsyncSocket, code: int, msg: string, id: JsonNode, data: JsonNode = newJNull()) {.async.} = ## Send error message to client let error = %{"code": %(code), "message": %msg, "data": data} - ifDebug: echo "Send error json: ", wrapReply(newJNull(), error, id).pretty & "\c\l" + ifDebug: echo "Send error json: ", wrapReply(newJNull(), error, id).pretty, "\c\l" # REVIEW: prefer in-place appending instead of string concatenation # (see the similar comment in clientdispatch.nim) result = client.send($wrapReply(id, newJNull(), error) & "\c\l")