fix: use let instead of var in example

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
Christopher Arndt 2022-10-06 04:42:42 +02:00
parent f5d01c043b
commit 896768696b
1 changed files with 3 additions and 1 deletions

View File

@ -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: <unknown>"
var action = if connect > 0: "connect" else: "disconnect"
let action = if connect > 0: "connect" else: "disconnect"
echo fmt"Action: {action}"