mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
removed artifact of the past in comments, all *dispatch* functions had an unused link def to ShutdownToken::shutdown
This commit is contained in:
parent
d2d572cce3
commit
af1c0b2864
1 changed files with 4 additions and 9 deletions
|
@ -277,7 +277,6 @@ where
|
|||
/// - An update from Telegram;
|
||||
/// - [`crate::types::Me`] (can be used in [`HandlerExt::filter_command`]).
|
||||
///
|
||||
/// [`shutdown`]: ShutdownToken::shutdown
|
||||
/// [`HandlerExt::filter_command`]: crate::dispatching::HandlerExt::filter_command
|
||||
pub async fn dispatch(&mut self)
|
||||
where
|
||||
|
@ -295,8 +294,6 @@ where
|
|||
/// `update_listener_error_handler`.
|
||||
///
|
||||
/// This method adds the same dependencies as [`Dispatcher::dispatch`].
|
||||
///
|
||||
/// [`shutdown`]: ShutdownToken::shutdown
|
||||
pub async fn dispatch_with_listener<'a, UListener, Eh>(
|
||||
&'a mut self,
|
||||
update_listener: UListener,
|
||||
|
@ -312,14 +309,12 @@ where
|
|||
}
|
||||
|
||||
/// Same as `dispatch_with_listener` but returns a `Err(_)` instead of
|
||||
/// panicking when the initial `get_me` call fails.
|
||||
/// panicking when the initial telegram api call (`get_me`) fails.
|
||||
///
|
||||
/// Starts your bot with custom `update_listener` and
|
||||
/// `update_listener_error_handler`.
|
||||
///
|
||||
/// This method adds the same dependencies as [`Dispatcher::dispatch`].
|
||||
///
|
||||
/// [`shutdown`]: ShutdownToken::shutdown
|
||||
pub async fn try_dispatch_with_listener<'a, UListener, Eh>(
|
||||
&'a mut self,
|
||||
mut update_listener: UListener,
|
||||
|
@ -487,8 +482,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// Setups the `^C` handler that [`shutdown`]s dispatching.
|
||||
///
|
||||
/// Setups the `^C` handler in order to call [`shutdown`] when pressed.
|
||||
/// [`shutdown`]: ShutdownToken::shutdown
|
||||
#[cfg(feature = "ctrlc_handler")]
|
||||
#[deprecated(since = "0.10.0", note = "use `enable_ctrlc_handler` on builder instead")]
|
||||
|
@ -499,6 +493,7 @@ where
|
|||
|
||||
/// Returns a shutdown token, which can later be used to shutdown
|
||||
/// dispatching.
|
||||
/// [`shutdown`]: ShutdownToken::shutdown
|
||||
pub fn shutdown_token(&self) -> ShutdownToken {
|
||||
self.state.clone()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue