Use custom_error! for all Webmetro errors
This commit is contained in:
parent
6895cde14a
commit
480fd1696a
8 changed files with 24 additions and 81 deletions
src
|
@ -98,7 +98,7 @@ impl<S: Stream<Item = Chunk, Error = WebmetroError>> Stream for Throttle<S>
|
|||
|
||||
fn poll(&mut self) -> Result<Async<Option<Self::Item>>, WebmetroError> {
|
||||
match self.sleep.poll() {
|
||||
Err(err) => return Err(WebmetroError::Unknown(Box::new(err))),
|
||||
Err(err) => return Err(err.into()),
|
||||
Ok(Async::NotReady) => return Ok(Async::NotReady),
|
||||
Ok(Async::Ready(())) => { /* can continue */ }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue