aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-02 13:01:05 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-02 13:01:05 -0400
commitaf74512d17c287f5435d70c32aa4ce1618156fb7 (patch)
treeccfe10f3e4f4a6de2bb7ee1c6359f8f5d588508b
parent78aa2bc558e9f568179bee0a067c0f20125e6f25 (diff)
downloadrusty-irc-af74512d17c287f5435d70c32aa4ce1618156fb7.tar.gz
rusty-irc-af74512d17c287f5435d70c32aa4ce1618156fb7.zip
fix some deprecationsHEADmaster
-rw-r--r--src/lib.rs1
-rw-r--r--src/msg.rs10
2 files changed, 5 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index cab49c5..a6c834b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,3 @@
-#![crate_id = "irc#0.1"]
#![crate_type = "lib"]
use std::io::TcpStream;
diff --git a/src/msg.rs b/src/msg.rs
index f84748d..0ff9e27 100644
--- a/src/msg.rs
+++ b/src/msg.rs
@@ -164,7 +164,7 @@ impl FromStr for Message {
for c in s.chars() {
match c {
c if is_final => {
- current_str.get_mut_ref().push_char(c);
+ current_str.as_mut().unwrap().push_char(c);
}
' ' => {
if is_prefix {
@@ -174,7 +174,7 @@ impl FromStr for Message {
cmd = current_str.take();
}
else {
- args.push(current_str.take_unwrap());
+ args.push(current_str.take().unwrap());
}
is_prefix = false;
}
@@ -191,7 +191,7 @@ impl FromStr for Message {
if current_str.is_none() {
current_str = Some(String::new());
}
- current_str.get_mut_ref().push_char(c)
+ current_str.as_mut().unwrap().push_char(c)
}
}
}
@@ -200,7 +200,7 @@ impl FromStr for Message {
cmd = current_str.take();
}
else {
- args.push(current_str.take_unwrap());
+ args.push(current_str.take().unwrap());
}
let prefix: Option<Prefix> = prefix.and_then(|s| from_str(s.as_slice()));
@@ -234,7 +234,7 @@ impl FromStr for Message {
other => {
match from_str::<u16>(other) {
Some(n) if args.len() > 0 => {
- let target = args.shift().unwrap();
+ let target = args.remove(0).unwrap();
cmd::Numeric(n, target, args)
}
_ => cmd::UnknownCmd(s.to_string(), args)