Cleaned up a bunch of the examples.

This commit is contained in:
Aaron Weiss 2018-01-28 02:00:04 +01:00
parent d6786936fa
commit af72e57c5f
No known key found for this signature in database
GPG key ID: 047D32DF25DC22EF
5 changed files with 29 additions and 44 deletions

View file

@ -17,13 +17,10 @@ fn main() {
server.for_each_incoming(|message| {
print!("{}", message);
match message.command {
Command::PRIVMSG(ref target, ref msg) => {
if msg.contains("pickles") {
server.send_privmsg(target, "Hi!").unwrap();
}
if let Command::PRIVMSG(ref target, ref msg) = message.command {
if msg.contains("pickles") {
server.send_privmsg(target, "Hi!").unwrap();
}
_ => (),
}
}).unwrap()
}).unwrap();
}