Changed from split_str to split.

This commit is contained in:
Aaron Weiss 2015-02-26 21:52:42 -05:00
parent 758bcfa784
commit 3274cf1107
2 changed files with 4 additions and 4 deletions

View file

@ -139,7 +139,7 @@ impl<T: IrcReader, U: IrcWriter> IrcServer<T, U> {
if cfg!(not(feature = "nochanlists")) { if cfg!(not(feature = "nochanlists")) {
if let Some(users) = msg.suffix.clone() { if let Some(users) = msg.suffix.clone() {
if let [_, _, ref chan] = &msg.args[..] { if let [_, _, ref chan] = &msg.args[..] {
for user in users.split_str(" ") { for user in users.split(" ") {
if match self.chanlists.lock().unwrap().get_mut(chan) { if match self.chanlists.lock().unwrap().get_mut(chan) {
Some(vec) => { vec.push(User::new(user)); false }, Some(vec) => { vec.push(User::new(user)); false },
None => true, None => true,
@ -228,7 +228,7 @@ impl<T: IrcReader, U: IrcWriter> IrcServer<T, U> {
} else { } else {
msg.len() msg.len()
}; };
msg[1..end].split_str(" ").collect() msg[1..end].split(" ").collect()
}; };
match tokens[0] { match tokens[0] {
"FINGER" => self.send_ctcp_internal(resp, &format!("FINGER :{} ({})", "FINGER" => self.send_ctcp_internal(resp, &format!("FINGER :{} ({})",

View file

@ -49,7 +49,7 @@ pub trait ServerExt<'a, T, U>: Server<'a, T, U> {
/// Sends a message to the specified target. /// Sends a message to the specified target.
#[stable] #[stable]
fn send_privmsg(&self, target: &str, message: &str) -> IoResult<()> { fn send_privmsg(&self, target: &str, message: &str) -> IoResult<()> {
for line in message.split_str("\r\n") { for line in message.split("\r\n") {
try!(self.send(PRIVMSG(target.to_owned(), line.to_owned()))) try!(self.send(PRIVMSG(target.to_owned(), line.to_owned())))
} }
Ok(()) Ok(())
@ -58,7 +58,7 @@ pub trait ServerExt<'a, T, U>: Server<'a, T, U> {
/// Sends a notice to the specified target. /// Sends a notice to the specified target.
#[stable] #[stable]
fn send_notice(&self, target: &str, message: &str) -> IoResult<()> { fn send_notice(&self, target: &str, message: &str) -> IoResult<()> {
for line in message.split_str("\r\n") { for line in message.split("\r\n") {
try!(self.send(NOTICE(target.to_owned(), line.to_owned()))) try!(self.send(NOTICE(target.to_owned(), line.to_owned())))
} }
Ok(()) Ok(())