Fix polling_default

This commit is contained in:
Temirkhan Myrzamadi 2020-02-25 04:18:27 +06:00
parent 57878c3d55
commit 4db46093cd

View file

@ -116,11 +116,11 @@ pub trait UpdateListener<E>: Stream<Item = Result<Update, E>> {
}
impl<S, E> UpdateListener<E> for S where S: Stream<Item = Result<Update, E>> {}
/// Returns a long polling update listener with the default configuration.
/// Returns a long polling update listener with `timeout` of 1 minute.
///
/// See also: [`polling`](polling).
pub fn polling_default(bot: Arc<Bot>) -> impl UpdateListener<RequestError> {
polling(bot, None, None, None)
polling(bot, Some(Duration::from_secs(1)), None, None)
}
/// Returns a long/short polling update listener with some additional options.