mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Add #[must_use] to Handler
This commit is contained in:
parent
3b4a8d1bb5
commit
0c5189a39b
2 changed files with 2 additions and 1 deletions
|
@ -198,7 +198,7 @@ impl<'a, E2, Eh> FilterDispatcher<'a, E2, Eh> {
|
|||
Ok(upd) => upd,
|
||||
Err(err) => {
|
||||
self.error_handler
|
||||
.handle_error(ErrorKind::FromUpdater(err));
|
||||
.handle_error(ErrorKind::FromUpdater(err)).await;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@ use std::{convert::Infallible, fmt::Debug, future::Future, pin::Pin};
|
|||
|
||||
/// An asynchronous handler of an error.
|
||||
pub trait ErrorHandler<E> {
|
||||
#[must_use]
|
||||
fn handle_error<'a>(
|
||||
&'a self,
|
||||
error: E,
|
||||
|
|
Loading…
Reference in a new issue