From ce5a494927abf66cc39cf849b9c66e2dadbe579e Mon Sep 17 00:00:00 2001 From: Clay Sweetser Date: Sat, 15 Feb 2014 18:57:03 -0500 Subject: Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks. --- tests/stdlib/tircbot.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/stdlib/tircbot.nim') 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 -- cgit 1.4.1-2-gfad0