mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Mark Dialogue::{new, chat_id}
as #[must_use]
This commit is contained in:
parent
4530f935cb
commit
f3b4769bc5
2 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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<S>, 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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue