From f22bd5eacc700c64c61c80249b077aa7a2cc2b99 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Mon, 6 Jul 2020 15:25:10 +0200 Subject: [PATCH] use more readable substr call --- examples/app/app.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/app/app.nim b/examples/app/app.nim index 794fb03..e11dc52 100644 --- a/examples/app/app.nim +++ b/examples/app/app.nim @@ -67,7 +67,7 @@ proc handleServerMessages(connection: ServerConnection) {.async.} = connection.outMessages.del(args[1]) future.fail(newException(ServerError, args[2])) of "notify-peer": - asyncCheck connection.peerNotifications.write(&"{args[1]}|{args[2]}") + asyncCheck connection.peerNotifications.write(line.substr(args[0].len + 1)) else: raise newException(ValueError, "invalid server message")