From: Lizzy Fleckenstein Date: Thu, 16 Feb 2023 16:16:55 +0000 (+0100) Subject: Implement clone for RudpSender X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=00d5412e25a502ff86b614e5cdda3000efb6f077;p=mt_rudp.git Implement clone for RudpSender --- diff --git a/src/common.rs b/src/common.rs index b888ed7..4c0bc08 100644 --- a/src/common.rs +++ b/src/common.rs @@ -69,6 +69,15 @@ pub struct RudpSender { pub(crate) share: Arc>, } +// derive(Clone) adds unwanted Clone trait bound to S parameter +impl Clone for RudpSender { + fn clone(&self) -> Self { + Self { + share: Arc::clone(&self.share), + } + } +} + macro_rules! impl_share { ($T:ident) => { impl $T {