diff options
author | James Ravenscroft | 2014-12-26 13:28:56 +0000 |
---|---|---|
committer | James Ravenscroft | 2014-12-26 13:28:56 +0000 |
commit | 26a8e0c20cc1a300f8d03e152c9910839ce1cd53 (patch) | |
tree | 359daddc40ae855ff5eaaab24101a1e73fc01b6b /src | |
parent | 8d42ad9822e7e4b9e595bb2bd587a5da0db8ce9a (diff) | |
download | irsc-26a8e0c20cc1a300f8d03e152c9910839ce1cd53.tar.gz irsc-26a8e0c20cc1a300f8d03e152c9910839ce1cd53.tar.xz irsc-26a8e0c20cc1a300f8d03e152c9910839ce1cd53.zip |
Put examples back to how they were before and removed some into_string deprecated calls
Diffstat (limited to 'src')
-rw-r--r-- | src/ident.rs | 7 | ||||
-rw-r--r-- | src/server.rs | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/ident.rs b/src/ident.rs index 19756ca..6a01d12 100644 --- a/src/ident.rs +++ b/src/ident.rs @@ -1,4 +1,5 @@ use regex::Regex; +use std::borrow::ToOwned; static PATTERN: Regex = regex!(":(.*)!(.*)@(.*)"); @@ -16,9 +17,9 @@ impl Ident { None => return None }; Some(Ident { - nickname: c.at(1).unwrap().into_string(), - user: c.at(2).unwrap().into_string(), - host: c.at(3).unwrap().into_string() + nickname: c.at(1).unwrap().to_owned(), + user: c.at(2).unwrap().to_owned(), + host: c.at(3).unwrap().to_owned() }) } } diff --git a/src/server.rs b/src/server.rs index 7504658..309ecfb 100644 --- a/src/server.rs +++ b/src/server.rs @@ -7,6 +7,8 @@ use std::io::{ use std::sync::Arc; use std::sync::Mutex; +use std::borrow::ToOwned; + use callback::Callback; use event; use event::Event; @@ -126,8 +128,8 @@ impl Server { let cmd = parts.remove(0).unwrap(); let event = Event { - prefix: prefix.into_string(), - command: cmd.into_string(), + prefix: prefix.to_owned(), + command: cmd.to_owned(), content: parts.iter().map(|p| p.into_string()).collect() }; |