From 50058305a9505e18678292e9f4b9b1dc17cd3949 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 9 Sep 2014 17:41:24 -0400 Subject: propagate a few more errors --- examples/client.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/client.rs b/examples/client.rs index 5b874bb..0794329 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -2,19 +2,22 @@ extern crate irc; use irc::constants::Pong; +use std::io; + pub struct ExampleClient; impl irc::ClientCallbacks for ExampleClient { - fn on_any_message (&mut self, _client: &mut irc::Client, m: &irc::Message) { + fn on_any_message (&mut self, _client: &mut irc::Client, m: &irc::Message) -> io::IoResult<()> { print!("{}", m.to_protocol_string()); + Ok(()) } - fn on_ping (&mut self, client: &mut irc::Client, _from: Option<&str>, server1: &str, server2: Option<&str>) { + fn on_ping (&mut self, client: &mut irc::Client, _from: Option<&str>, server1: &str, server2: Option<&str>) -> io::IoResult<()> { let params = match server2 { Some(server2) => vec![server1.to_string(), server2.to_string()], None => vec![server1.to_string()], }; - client.write(irc::Message::new(None, Pong, params)); + client.write(irc::Message::new(None, Pong, params)) } } -- cgit v1.2.3