mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
Correct a comment
This commit is contained in:
parent
8917e05bf8
commit
11fe8baebf
1 changed files with 3 additions and 7 deletions
|
@ -124,13 +124,9 @@ pub trait AsUpdateStream<'a> {
|
||||||
type StreamErr;
|
type StreamErr;
|
||||||
|
|
||||||
/// The stream of updates from Telegram.
|
/// The stream of updates from Telegram.
|
||||||
// HACK: There is currently no way to write something like
|
// NB: `Send` is not strictly required here, but it makes it easier to return
|
||||||
// `-> impl for<'a> AsUpdateStream<'a, E, Stream: Send>`. Since we return
|
// `impl AsUpdateStream` and also you want `Send` streams almost (?) always
|
||||||
// `impl UpdateListener<E>` from `polling`, we need to have `Send` bound here,
|
// anyway.
|
||||||
// to make the stream `Send`.
|
|
||||||
//
|
|
||||||
// Without this it's, for example, impossible to spawn a tokio task with
|
|
||||||
// teloxide polling.
|
|
||||||
type Stream: Stream<Item = Result<Update, Self::StreamErr>> + Send + 'a;
|
type Stream: Stream<Item = Result<Update, Self::StreamErr>> + Send + 'a;
|
||||||
|
|
||||||
/// Creates the update [`Stream`].
|
/// Creates the update [`Stream`].
|
||||||
|
|
Loading…
Add table
Reference in a new issue