mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
ToOwned<Owned = D> -> D: Clone
This commit is contained in:
parent
eac67af27a
commit
68135d004f
3 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- Do not return a dialogue from `Storage::{remove_dialogue, update_dialogue}`.
|
||||
- Require `D: ToOwned<Owned = D>` in `dialogues_repl` and `InMemStorage`.
|
||||
- Require `D: Clone` in `dialogues_repl(_with_listener)` and `InMemStorage`.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ impl<S> InMemStorage<S> {
|
|||
|
||||
impl<D> Storage<D> for InMemStorage<D>
|
||||
where
|
||||
D: ToOwned<Owned = D>,
|
||||
D: Clone,
|
||||
D: Send + 'static,
|
||||
{
|
||||
type Error = std::convert::Infallible;
|
||||
|
|
|
@ -26,7 +26,7 @@ use teloxide_core::{requests::Requester, types::Message};
|
|||
pub async fn dialogues_repl<'a, R, H, D, Fut>(requester: R, handler: H)
|
||||
where
|
||||
H: Fn(UpdateWithCx<R, Message>, D) -> Fut + Send + Sync + 'static,
|
||||
D: ToOwned<Owned = D> + Default + Send + 'static,
|
||||
D: Clone + Default + Send + 'static,
|
||||
Fut: Future<Output = DialogueStage<D>> + Send + 'static,
|
||||
R: Requester + Send + Clone + 'static,
|
||||
<R as Requester>::GetUpdatesFaultTolerant: Send,
|
||||
|
@ -61,7 +61,7 @@ pub async fn dialogues_repl_with_listener<'a, R, H, D, Fut, L, ListenerE>(
|
|||
listener: L,
|
||||
) where
|
||||
H: Fn(UpdateWithCx<R, Message>, D) -> Fut + Send + Sync + 'static,
|
||||
D: ToOwned<Owned = D> + Default + Send + 'static,
|
||||
D: Clone + Default + Send + 'static,
|
||||
Fut: Future<Output = DialogueStage<D>> + Send + 'static,
|
||||
L: UpdateListener<ListenerE> + Send + 'a,
|
||||
ListenerE: Debug + Send + 'a,
|
||||
|
|
Loading…
Add table
Reference in a new issue