Merge pull request #1105 from pfa230/throttle_clone

Fix issue with Throttle and Trace adaptors losing Requester trait bounds
This commit is contained in:
Waffle Maybe 2024-08-06 06:50:15 +00:00 committed by GitHub
commit f081e04ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -19,6 +19,7 @@ use crate::{
/// Request returned by [`Throttling`](crate::adaptors::Throttle) methods. /// Request returned by [`Throttling`](crate::adaptors::Throttle) methods.
#[must_use = "Requests are lazy and do nothing unless sent"] #[must_use = "Requests are lazy and do nothing unless sent"]
#[derive(Clone)]
pub struct ThrottlingRequest<R: HasPayload> { pub struct ThrottlingRequest<R: HasPayload> {
pub(super) request: Arc<R>, pub(super) request: Arc<R>,
pub(super) chat_id: fn(&R::Payload) -> ChatIdHash, pub(super) chat_id: fn(&R::Payload) -> ChatIdHash,

View file

@ -243,6 +243,7 @@ where
} }
#[must_use = "Requests are lazy and do nothing unless sent"] #[must_use = "Requests are lazy and do nothing unless sent"]
#[derive(Clone)]
pub struct TraceRequest<R> { pub struct TraceRequest<R> {
inner: R, inner: R,
settings: Settings, settings: Settings,