From 896768696b474930611af4e1b3de1fc15bb383f3 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Thu, 6 Oct 2022 04:42:42 +0200 Subject: [PATCH] fix: use let instead of var in example Signed-off-by: Christopher Arndt --- examples/test_port_connect_cb.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/test_port_connect_cb.nim b/examples/test_port_connect_cb.nim index eb72b21..99032eb 100644 --- a/examples/test_port_connect_cb.nim +++ b/examples/test_port_connect_cb.nim @@ -7,10 +7,12 @@ var status: cint proc cleanup() {.noconv.} = echo "Cleaning up..." + if client != nil: discard deactivate(client) discard clientClose(client) client = nil + quit 0 proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) {.exportc.} = @@ -29,7 +31,7 @@ proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) else: echo "Port B: " - var action = if connect > 0: "connect" else: "disconnect" + let action = if connect > 0: "connect" else: "disconnect" echo fmt"Action: {action}"