mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
clippy stop being so mean to me pleaaseedekdseu;}yudc})vr)f
This commit is contained in:
parent
67e297db3a
commit
9abc6b9b7b
2 changed files with 5 additions and 5 deletions
|
@ -44,6 +44,8 @@ mod polling;
|
|||
#[allow(deprecated)]
|
||||
pub use self::polling::{polling, polling_default, Polling, PollingBuilder, PollingStream};
|
||||
|
||||
type BoxFut<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
|
||||
|
||||
/// An update listener.
|
||||
///
|
||||
/// Implementors of this trait allow getting updates from Telegram. See
|
||||
|
@ -73,9 +75,7 @@ pub trait UpdateListener {
|
|||
/// should call `set_webhook`.
|
||||
///
|
||||
/// [`Stream`]: AsUpdateStream::Stream
|
||||
fn listen(
|
||||
&mut self,
|
||||
) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'_>, Self::SetupErr>> + Send + '_>>;
|
||||
fn listen(&mut self) -> BoxFut<'_, Result<Self::Stream<'_>, Self::SetupErr>>;
|
||||
|
||||
/// Hint which updates should the listener listen for.
|
||||
///
|
||||
|
|
|
@ -447,9 +447,9 @@ fn polling_is_send() {
|
|||
assert_send(&polling.listen());
|
||||
assert_send(&polling.stop_token());
|
||||
|
||||
_ = async {
|
||||
drop(async {
|
||||
assert_send(&polling.listen().await.unwrap());
|
||||
};
|
||||
});
|
||||
|
||||
fn assert_send(_: &impl Send) {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue