diff options
| author | Nathan Perry <avaglir@gmail.com> | 2018-02-15 00:03:32 -0500 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2018-02-15 00:03:51 -0500 |
| commit | d410d75ca967d476784eaca22d6e49f21ca318dd (patch) | |
| tree | 77d1c364e075e6f6123d7fcd238a04496664e66b /src/main.rs | |
| parent | 66eeaaab1777c6bb85627c2a41fd5234a7576f84 (diff) | |
start adding in diesel
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index cca9264..fb510a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ #[macro_use] extern crate log; #[macro_use] extern crate error_chain; #[macro_use] extern crate lazy_static; +#[macro_use] extern crate cfg_if; extern crate dotenv; extern crate fern; @@ -9,6 +10,13 @@ extern crate typemap; extern crate url; extern crate chrono; +cfg_if! { + if #[cfg(feature = "diesel")] { + #[macro_use] extern crate diesel; + mod db; + } +} + mod commands; mod util; @@ -31,6 +39,8 @@ mod errors { foreign_links { Serenity(::serenity::Error); MissingVar(::std::env::VarError); + DieselConn(::diesel::ConnectionError) #[cfg(feature = "diesel")]; + Diesel(::diesel::result::Error) #[cfg(feature = "diesel")]; } } } |
