Split hammond_data::errors to its own file.

This commit is contained in:
Jordan Petridis 2017-10-05 15:07:40 +03:00
parent 93027e5530
commit 078331c15f
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 22 additions and 24 deletions

View File

@ -0,0 +1,18 @@
use diesel::migrations::RunMigrationsError;
use diesel::result;
use rss;
use hyper;
use reqwest;
use std::io;
error_chain! {
foreign_links {
MigrationError(RunMigrationsError);
DieselResultError(result::Error);
RSSError(rss::Error);
HyperError(hyper::error::Error);
ReqError(reqwest::Error);
IoError(io::Error);
}
}

View File

@ -15,12 +15,12 @@ extern crate diesel;
#[macro_use]
extern crate diesel_codegen;
extern crate hyper;
extern crate rayon;
extern crate reqwest;
extern crate hyper;
extern crate xdg;
extern crate rss;
extern crate rfc822_sanitizer;
extern crate rss;
extern crate xdg;
pub mod dbqueries;
pub mod models;
@ -28,27 +28,7 @@ pub mod schema;
pub mod index_feed;
pub mod feedparser;
pub mod errors {
use diesel::migrations::RunMigrationsError;
use diesel::result;
use rss;
use hyper;
use reqwest;
use std::io;
error_chain! {
foreign_links {
MigrationError(RunMigrationsError);
DieselResultError(result::Error);
RSSError(rss::Error);
HyperError(hyper::error::Error);
ReqError(reqwest::Error);
IoError(io::Error);
}
}
}
pub mod errors;
use errors::*;
use diesel::prelude::*;