Use custom_error! for all Webmetro errors

This commit is contained in:
Tangent 2019-01-03 00:40:12 -05:00
parent 6895cde14a
commit 480fd1696a
8 changed files with 24 additions and 81 deletions

View file

@ -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 */ }
}