aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTill Höppner2015-04-18 15:29:14 +0200
committerTill Höppner2015-04-18 15:29:14 +0200
commit057d3e0bdb4bb46749267b45223281fd9afc956d (patch)
treef6994ad12dd7d765d58958599705fb3d9d2c4d16 /src/lib.rs
parent326b5d9d96a5f45fa8b371f2a78394bcd87030e0 (diff)
parent4eea7cdff640f31f6595ec880d5405665fbd5c55 (diff)
downloadirsc-057d3e0bdb4bb46749267b45223281fd9afc956d.tar.gz
irsc-057d3e0bdb4bb46749267b45223281fd9afc956d.tar.xz
irsc-057d3e0bdb4bb46749267b45223281fd9afc956d.zip
Merge pull request #3 from tilpner/refactor
Refactor
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6d0b42d..577770d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,14 +1,27 @@
-#![feature(globs, phase, slicing_syntax, macro_rules, unboxed_closures)]
+#![feature(plugin, collections)]
+#![plugin(regex_macros)]
-#[phase(plugin)]
-extern crate regex_macros;
extern crate regex;
-
-#[phase(plugin, link)]
+#[macro_use]
extern crate log;
+extern crate eventual;
pub mod server;
pub mod color;
pub mod ident;
pub mod callback;
-pub mod event;
+pub mod message;
+
+use std::io;
+use std::result;
+
+#[derive(Debug)]
+pub enum IrscError {
+ Io(io::Error),
+ AlreadyConnected,
+ NotConnected
+}
+
+pub type Result<T> = result::Result<T, IrscError>;
+
+pub const DEBUG: bool = cfg!(not(ndebug));