mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 16:40:00 +02:00
load config files in background thread
This commit is contained in:
parent
2cac8a2678
commit
f570873aba
8 changed files with 480 additions and 326 deletions
12
src/error.rs
12
src/error.rs
|
@ -1,4 +1,4 @@
|
|||
use failure::{Context, Fail, Backtrace, Error};
|
||||
use failure::{Backtrace, Context, Error, Fail};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -50,7 +50,9 @@ impl ScraperError {
|
|||
|
||||
impl From<ScraperErrorKind> for ScraperError {
|
||||
fn from(kind: ScraperErrorKind) -> ScraperError {
|
||||
ScraperError { inner: Context::new(kind) }
|
||||
ScraperError {
|
||||
inner: Context::new(kind),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,6 +64,8 @@ impl From<Context<ScraperErrorKind>> for ScraperError {
|
|||
|
||||
impl From<Error> for ScraperError {
|
||||
fn from(_: Error) -> ScraperError {
|
||||
ScraperError { inner: Context::new(ScraperErrorKind::Unknown) }
|
||||
ScraperError {
|
||||
inner: Context::new(ScraperErrorKind::Unknown),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue