From af74512d17c287f5435d70c32aa4ce1618156fb7 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 2 Sep 2014 13:01:05 -0400 Subject: fix some deprecations --- src/lib.rs | 1 - src/msg.rs | 10 +++++----- 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.and_then(|s| from_str(s.as_slice())); @@ -234,7 +234,7 @@ impl FromStr for Message { other => { match from_str::(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) -- cgit v1.2.3