From 1ff0440762431f190468e088ffd3eecd28f23496 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Mon, 4 Jul 2022 23:45:49 +0400 Subject: [PATCH] Mark `Polling` and `PollingBuilder` as `must_use` Former-commit-id: 430df0cefbdbf442b930701125ba7cf01cfdecc0 --- src/dispatching/update_listeners/polling.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dispatching/update_listeners/polling.rs b/src/dispatching/update_listeners/polling.rs index 9a2ee7d6..906ec98c 100644 --- a/src/dispatching/update_listeners/polling.rs +++ b/src/dispatching/update_listeners/polling.rs @@ -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 { bot: R, timeout: Option, @@ -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 { bot: B, timeout: Option,