Make a counterfeit rss Error.
This commit is contained in:
parent
e84e7df3f1
commit
34d7391363
@ -31,6 +31,9 @@ pub enum DataError {
|
||||
TLSError(#[cause] native_tls::Error),
|
||||
#[fail(display = "IO Error: {}", _0)]
|
||||
IOError(#[cause] io::Error),
|
||||
#[fail(display = "RSS Error: {}", _0)]
|
||||
// Rss::Error is not yet Sync
|
||||
RssCrateError(String),
|
||||
#[fail(display = "WANNABE BAIL ERROR: {}", _0)]
|
||||
DiscountBail(String),
|
||||
}
|
||||
|
||||
@ -242,8 +242,7 @@ fn response_to_channel(
|
||||
.map(|iter| iter.collect::<Vec<u8>>())
|
||||
.map(|utf_8_bytes| String::from_utf8_lossy(&utf_8_bytes).into_owned())
|
||||
.and_then(|buf| {
|
||||
Channel::from_str(&buf)
|
||||
.or_else(|_| Err(DataError::DiscountBail(format!("RSS crate Error"))))
|
||||
Channel::from_str(&buf).or_else(|err| Err(DataError::RssCrateError(format!("{}", err))))
|
||||
});
|
||||
let cpu_chan = pool.spawn(chan);
|
||||
Box::new(cpu_chan)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user