Merge pull request #111 from aatxe/develop

Finalize 0.13.1 release
This commit is contained in:
Aaron Weiss 2018-01-28 05:01:32 +01:00 committed by GitHub
commit 65cdfd1f80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "irc" name = "irc"
version = "0.13.0" version = "0.13.1"
description = "A simple, thread-safe, and async-friendly library for IRC clients." description = "A simple, thread-safe, and async-friendly library for IRC clients."
authors = ["Aaron Weiss <awe@pdgn.co>"] authors = ["Aaron Weiss <awe@pdgn.co>"]
license = "MPL-2.0" license = "MPL-2.0"

View file

@ -34,13 +34,13 @@ use irc::client::prelude::*;
fn main() { fn main() {
let cfg = Config { let cfg = Config {
nickname: Some(format!("irc-rs")), nickname: Some(format!("irc-rs")),
server: Some(format!("irc.example.com")), client: Some(format!("irc.example.com")),
channels: Some(vec![format!("#test")]), channels: Some(vec![format!("#test")]),
.. Default::default() .. Default::default()
}; };
let server = IrcServer::from_config(cfg).unwrap(); let client = IrcClient::from_config(cfg).unwrap();
server.identify().unwrap(); client.identify().unwrap();
server.for_each_incoming(|message| { client.for_each_incoming(|message| {
// Do message processing. // Do message processing.
}).unwrap() }).unwrap()
} }
@ -61,9 +61,9 @@ extern crate irc;
use irc::client::prelude::*; use irc::client::prelude::*;
fn main() { fn main() {
let server = IrcServer::new("config.toml").unwrap(); let client = IrcClient::new("config.toml").unwrap();
server.identify().unwrap(); client.identify().unwrap();
server.for_each_incoming(|message| { client.for_each_incoming(|message| {
// Do message processing. // Do message processing.
}).unwrap() }).unwrap()
} }