aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event.rs4
-rw-r--r--src/server.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/event.rs b/src/event.rs
index aef34f9..b8e9743 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -1,5 +1,7 @@
use ident::Ident;
+use std::borrow::ToOwned;
+
#[deriving(Clone)]
pub struct Event {
pub prefix: String,
@@ -17,7 +19,7 @@ pub const PRIVMSG: &'static str = "PRIVMSG";
fn join(v: Vec<String>, from: uint) -> String {
let mut msg = if v[from].chars().next().unwrap() == ':' {
- v[from][][1..].into_string()
+ v[from][][1..].to_owned()
} else { v[from].clone() };
for m in v.iter().skip(from + 1) {
msg.push_str(" ");
diff --git a/src/server.rs b/src/server.rs
index 309ecfb..4c4479a 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -130,7 +130,7 @@ impl Server {
let event = Event {
prefix: prefix.to_owned(),
command: cmd.to_owned(),
- content: parts.iter().map(|p| p.into_string()).collect()
+ content: parts.into_iter().map(|s| s.to_owned()).collect()
};
self.events.lock().fire(&(self.clone(), event));