Changed examples to be formatted more readibly.

This commit is contained in:
Aaron Weiss 2017-06-21 21:54:48 -04:00
parent 514a08d838
commit d57bb11994
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2
2 changed files with 20 additions and 28 deletions

View file

@ -13,9 +13,7 @@ fn main() {
};
let server = IrcServer::from_config(config).unwrap();
server.identify().unwrap();
server
.stream()
.for_each(|message| {
server.stream().for_each(|message| {
print!("{}", message);
match message.command {
Command::PRIVMSG(ref target, ref msg) => {
@ -26,7 +24,5 @@ fn main() {
_ => (),
}
Ok(())
})
.wait()
.unwrap()
}).wait().unwrap()
}

View file

@ -14,9 +14,7 @@ fn main() {
};
let server = IrcServer::from_config(config).unwrap();
server.identify().unwrap();
server
.stream()
.for_each(|message| {
server.stream().for_each(|message| {
print!("{}", message);
match message.command {
Command::PRIVMSG(ref target, ref msg) => {
@ -27,7 +25,5 @@ fn main() {
_ => (),
}
Ok(())
})
.wait()
.unwrap()
}).wait().unwrap()
}