aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJames Ravenscroft2014-12-25 16:54:29 +0000
committerJames Ravenscroft2014-12-25 16:54:29 +0000
commit7181a9824cb7bda6e10f83f0a4d11e3fd493dcbf (patch)
tree69f07266095cc33bb3c26ec98c9753ce5e361ef6 /examples
parentce4ab4d6a395bbce37531225d506552d6a910f3f (diff)
downloadirsc-7181a9824cb7bda6e10f83f0a4d11e3fd493dcbf.tar.gz
irsc-7181a9824cb7bda6e10f83f0a4d11e3fd493dcbf.tar.xz
irsc-7181a9824cb7bda6e10f83f0a4d11e3fd493dcbf.zip
Fixed casting of function pointers
Diffstat (limited to 'examples')
-rw-r--r--examples/01.rs4
1 files changed, 2 insertions, 2 deletions
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();