diff --git a/CHANGELOG.md b/CHANGELOG.md index 37775159..be3800cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `UpdateListener::StopToken` is now always `Send` [**BC**]. - Rename `BotCommand` trait to `BotCommands` [**BC**]. - `BotCommands::descriptions` now returns `CommandDescriptions` instead of `String` [**BC**]. + - Mark `Dialogue::new` as `#[must_use]`. ## 0.7.2 - 2022-03-23 diff --git a/src/dispatching/dialogue/mod.rs b/src/dispatching/dialogue/mod.rs index 3dc0e95f..33d6f3ad 100644 --- a/src/dispatching/dialogue/mod.rs +++ b/src/dispatching/dialogue/mod.rs @@ -120,11 +120,13 @@ where { /// Constructs a new dialogue with `storage` (where dialogues are stored) /// and `chat_id` of a current dialogue. + #[must_use] pub fn new(storage: Arc, chat_id: i64) -> Self { Self { storage, chat_id, _phantom: PhantomData } } /// Returns a chat ID associated with this dialogue. + #[must_use] pub fn chat_id(&self) -> i64 { self.chat_id }