From 7181a9824cb7bda6e10f83f0a4d11e3fd493dcbf Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Thu, 25 Dec 2014 16:54:29 +0000 Subject: Fixed casting of function pointers --- examples/01.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/01.rs b/examples/01.rs index 9756119..ec35e5d 100644 --- a/examples/01.rs +++ b/examples/01.rs @@ -24,14 +24,14 @@ fn callback(arg: (Server, Event)) { fn main() { let mut s = Server::new(); - s.connect("irc.freenode.org".into_string(), 6667).unwrap(); + s.connect("irc.aberwiki.org".into_string(), 6667).unwrap(); s.nick(NAME).unwrap(); s.user(NAME, "*", "*", DESC).unwrap(); s.join("#botzoo").unwrap(); s.msg("flan3002", "Hey, I'm your example bot!").unwrap(); - s.events.lock().register(&callback); + s.events.lock().register(&(callback as fn((Server,Event)))); // Dedicate this thread to listening and event processing s.listen().unwrap(); -- cgit v1.2.3 From 26a8e0c20cc1a300f8d03e152c9910839ce1cd53 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Fri, 26 Dec 2014 13:28:56 +0000 Subject: Put examples back to how they were before and removed some into_string deprecated calls --- examples/01.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/01.rs b/examples/01.rs index ec35e5d..0bf51f5 100644 --- a/examples/01.rs +++ b/examples/01.rs @@ -24,7 +24,7 @@ fn callback(arg: (Server, Event)) { fn main() { let mut s = Server::new(); - s.connect("irc.aberwiki.org".into_string(), 6667).unwrap(); + s.connect("irc.freenode.org".into_string(), 6667).unwrap(); s.nick(NAME).unwrap(); s.user(NAME, "*", "*", DESC).unwrap(); s.join("#botzoo").unwrap(); -- cgit v1.2.3