diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/message.rs | 4 | ||||
-rw-r--r-- | src/server.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/message.rs b/src/message.rs index dfe7f29..fd77aef 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1189,7 +1189,7 @@ mod test { Some(Cow::Owned("*** Looking up your hostname...".to_owned())), MsgType::Irc ); - assert_eq!(a.parse(), Some(a2.clone())); + assert_eq!(a.parse::<Message>().unwrap(), a2.clone()); assert_eq!(a2.to_string(), a); let b = ":d PRIVMSG You :\u{1}ACTION sends you funny pictures of cats!\u{1}"; @@ -1200,7 +1200,7 @@ mod test { Some(Cow::Owned("\u{1}ACTION sends you funny pictures of cats!\u{1}".to_owned())), MsgType::Ctcp ); - assert_eq!(b.parse(), Some(b2.clone())); + assert_eq!(b.parse::<Message>().unwrap(), b2.clone()); assert_eq!(b2.to_string(), b); } diff --git a/src/server.rs b/src/server.rs index dfe5051..8f48938 100644 --- a/src/server.rs +++ b/src/server.rs @@ -2,7 +2,7 @@ use std::io::{ self, Write, Read, -// BufRead, + BufRead, BufReader, }; @@ -154,7 +154,7 @@ impl Server { None => return Err(::IrscError::NotConnected) }); - /*for line in reader.lines() { + for line in reader.lines() { let line = line.unwrap().parse(); if let Ok(msg) = line { @@ -164,7 +164,7 @@ impl Server { e(self, &msg) } } - }*/ + } Ok(()) } } |