diff --git a/CHANGELOG.md b/CHANGELOG.md index f9fd1fe2..57b15230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +### Added + +- `impl Clone` for {`CacheMe<_>`, `DefaultParseMode<_>`, `Throttle<_>`} ([#75][pr75]) + +[pr75]: https://github.com/teloxide/teloxide-core/pull/75 + ### Fixed - `GetChatAdministrators` output type `ChatMember` => `Vec` ([#73][pr73]) diff --git a/src/adaptors/cache_me.rs b/src/adaptors/cache_me.rs index 26ed04b9..fdbccb61 100644 --- a/src/adaptors/cache_me.rs +++ b/src/adaptors/cache_me.rs @@ -18,6 +18,7 @@ use crate::{ /// /// Bot's user is hardly ever changed, so sometimes it's reasonable to cache /// response from `get_me` method. +#[derive(Clone)] pub struct CacheMe { bot: B, me: Arc>, diff --git a/src/adaptors/parse_mode.rs b/src/adaptors/parse_mode.rs index d753f422..6d1c9948 100644 --- a/src/adaptors/parse_mode.rs +++ b/src/adaptors/parse_mode.rs @@ -6,6 +6,7 @@ use crate::{ /// Default parse mode adaptor, see /// [`RequesterExt::parse_mode`](crate::requests::RequesterExt::parse_mode). +#[derive(Clone)] pub struct DefaultParseMode { bot: B, mode: ParseMode, diff --git a/src/adaptors/throttle.rs b/src/adaptors/throttle.rs index adcdfb16..74149fdb 100644 --- a/src/adaptors/throttle.rs +++ b/src/adaptors/throttle.rs @@ -146,6 +146,7 @@ impl Default for Limits { /// /// As such, we encourage not to use `ChatId::ChannelUsername(u)` with this bot /// wrapper. +#[derive(Clone)] pub struct Throttle { bot: B, // `RequestLock` allows to unlock requests (allowing them to be sent).