mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge pull request #363 from teloxide/must-use-storage
Mark all the functions of `Storage` as `#[must_use]`
This commit is contained in:
commit
2155e2b975
2 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Remove the `reqwest` dependency. It's not needed after the [teloxide-core] integration.
|
||||
- A storage persistency bug ([issue 304](https://github.com/teloxide/teloxide/issues/304)).
|
||||
- Log errors from `Storage::{remove_dialogue, update_dialogue}` in `DialogueDispatcher` ([issue 302](https://github.com/teloxide/teloxide/issues/302)).
|
||||
- Mark all the functions of `Storage` as `#[must_use]`.
|
||||
|
||||
## [0.4.0] - 2021-03-22
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ pub trait Storage<D> {
|
|||
type Error;
|
||||
|
||||
/// Removes a dialogue indexed by `chat_id`.
|
||||
#[must_use = "Futures are lazy and do nothing unless polled with .await"]
|
||||
fn remove_dialogue(
|
||||
self: Arc<Self>,
|
||||
chat_id: i64,
|
||||
|
@ -51,6 +52,7 @@ pub trait Storage<D> {
|
|||
D: Send + 'static;
|
||||
|
||||
/// Updates a dialogue indexed by `chat_id` with `dialogue`.
|
||||
#[must_use = "Futures are lazy and do nothing unless polled with .await"]
|
||||
fn update_dialogue(
|
||||
self: Arc<Self>,
|
||||
chat_id: i64,
|
||||
|
@ -60,6 +62,7 @@ pub trait Storage<D> {
|
|||
D: Send + 'static;
|
||||
|
||||
/// Provides a dialogue indexed by `chat_id`.
|
||||
#[must_use = "Futures are lazy and do nothing unless polled with .await"]
|
||||
fn get_dialogue(
|
||||
self: Arc<Self>,
|
||||
chat_id: i64,
|
||||
|
|
Loading…
Add table
Reference in a new issue