Add #[must_use] to Handler

This commit is contained in:
Temirkhan Myrzamadi 2019-12-31 01:15:58 +06:00
parent 3b4a8d1bb5
commit 0c5189a39b
2 changed files with 2 additions and 1 deletions

View file

@ -198,7 +198,7 @@ impl<'a, E2, Eh> FilterDispatcher<'a, E2, Eh> {
Ok(upd) => upd, Ok(upd) => upd,
Err(err) => { Err(err) => {
self.error_handler self.error_handler
.handle_error(ErrorKind::FromUpdater(err)); .handle_error(ErrorKind::FromUpdater(err)).await;
return; return;
} }
}; };

View file

@ -5,6 +5,7 @@ use std::{convert::Infallible, fmt::Debug, future::Future, pin::Pin};
/// An asynchronous handler of an error. /// An asynchronous handler of an error.
pub trait ErrorHandler<E> { pub trait ErrorHandler<E> {
#[must_use]
fn handle_error<'a>( fn handle_error<'a>(
&'a self, &'a self,
error: E, error: E,