Mark Polling and PollingBuilder as must_use

Former-commit-id: 430df0cefb
This commit is contained in:
Maybe Waffle 2022-07-04 23:45:49 +04:00
parent f0608da9c3
commit 1ff0440762

View file

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