diff options
-rw-r--r-- | src/common.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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<S: UdpSender> { pub(crate) share: Arc<RudpShare<S>>, } +// derive(Clone) adds unwanted Clone trait bound to S parameter +impl<S: UdpSender> Clone for RudpSender<S> { + fn clone(&self) -> Self { + Self { + share: Arc::clone(&self.share), + } + } +} + macro_rules! impl_share { ($T:ident) => { impl<S: UdpSender> $T<S> { |