Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks.
This commit is contained in:
parent
f701ee086a
commit
ce5a494927
26 changed files with 74 additions and 74 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue