diff options
author | Clay Sweetser <clay.sweetser@gmail.com> | 2014-02-15 18:57:03 -0500 |
---|---|---|
committer | Clay Sweetser <clay.sweetser@gmail.com> | 2014-02-15 18:57:03 -0500 |
commit | ce5a494927abf66cc39cf849b9c66e2dadbe579e (patch) | |
tree | a09a0e48025c79fee103b16f19140f533b7c6847 /tests/stdlib/tircbot.nim | |
parent | f701ee086aacf3ad9d4f58c20d5924fc0c5b3bb2 (diff) | |
download | Nim-ce5a494927abf66cc39cf849b9c66e2dadbe579e.tar.gz |
Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks.
Diffstat (limited to 'tests/stdlib/tircbot.nim')
-rw-r--r-- | tests/stdlib/tircbot.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/stdlib/tircbot.nim b/tests/stdlib/tircbot.nim index 6008838ff..71ecb0b48 100644 --- a/tests/stdlib/tircbot.nim +++ b/tests/stdlib/tircbot.nim @@ -183,7 +183,7 @@ type channel: string timestamp: TTime case kind*: TSeenType - of PSeenJoin: nil + of PSeenJoin: discard of PSeenPart, PSeenQuit, PSeenMsg: msg: string of PSeenNick: @@ -200,7 +200,7 @@ proc setSeen(d: TDb, s: TSeen) = var hashToSet = @[("type", $s.kind.int), ("channel", s.channel), ("timestamp", $s.timestamp.int)] case s.kind - of PSeenJoin: nil + of PSeenJoin: discard of PSeenPart, PSeenMsg, PSeenQuit: hashToSet.add(("msg", s.msg)) of PSeenNick: @@ -338,7 +338,7 @@ proc hubConnect(state: PState) = proc handleIrc(irc: PAsyncIRC, event: TIRCEvent, state: PState) = case event.typ - of EvConnected: nil + of EvConnected: discard of EvDisconnected: while not state.ircClient.isConnected: try: @@ -424,7 +424,7 @@ proc handleIrc(irc: PAsyncIRC, event: TIRCEvent, state: PState) = seenNick.newNick = event.params[0] state.database.setSeen(seenNick) else: - nil # TODO: ? + discard # TODO: ? proc open(port: TPort = TPort(5123)): PState = var res: PState |