Make {Json,Multipart}Request clonable

This is required for the new `Throttle` design
This commit is contained in:
Maybe Waffle 2021-10-24 22:16:37 +03:00
parent 43802a5c41
commit 0a03431653
2 changed files with 2 additions and 0 deletions

View file

@ -10,6 +10,7 @@ use crate::{
///
/// [JSON]: https://core.telegram.org/bots/api#making-requests
#[must_use = "Requests are lazy and do nothing unless sent"]
#[derive(Clone)]
pub struct JsonRequest<P> {
bot: Bot,
payload: P,

View file

@ -11,6 +11,7 @@ use crate::{
///
/// [multipart/form-data]: https://core.telegram.org/bots/api#making-requests
#[must_use = "Requests are lazy and do nothing unless sent"]
#[derive(Clone)]
pub struct MultipartRequest<P> {
bot: Bot,
payload: P,