Mark Polling and PollingBuilder as must_use

This commit is contained in:
Maybe Waffle 2022-07-04 23:45:49 +04:00
parent 08da55f54f
commit 430df0cefb

View file

@ -24,6 +24,7 @@ use crate::{
/// Builder for polling update listener. /// Builder for polling update listener.
/// ///
/// Can be created by [`Polling::builder`]. /// Can be created by [`Polling::builder`].
#[must_use = "`PollingBuilder` is a builder and does nothing unless used"]
pub struct PollingBuilder<R> { pub struct PollingBuilder<R> {
bot: R, bot: R,
timeout: Option<Duration>, timeout: Option<Duration>,
@ -233,6 +234,7 @@ where
/// ///
/// [get_updates]: crate::requests::Requester::get_updates /// [get_updates]: crate::requests::Requester::get_updates
/// [`Dispatcher`]: crate::dispatching::Dispatcher /// [`Dispatcher`]: crate::dispatching::Dispatcher
#[must_use = "`Polling` is an update listener and does nothing unless used"]
pub struct Polling<B: Requester> { pub struct Polling<B: Requester> {
bot: B, bot: B,
timeout: Option<Duration>, timeout: Option<Duration>,