From 5e276099e494133d328da2d7d97cc5d46f407b0c Mon Sep 17 00:00:00 2001 From: "Franz Heinzmann (Frando)" Date: Fri, 1 Apr 2022 15:59:53 +0200 Subject: [PATCH] Make transports clone --- src/transport/combined.rs | 1 + src/transport/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transport/combined.rs b/src/transport/combined.rs index 349ea51..7669c08 100644 --- a/src/transport/combined.rs +++ b/src/transport/combined.rs @@ -158,6 +158,7 @@ impl Stream for CombinedTransport { } } +#[derive(Clone)] pub enum CombinedStream { Tcp(TcpStream), #[cfg(feature = "transport_utp")] diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 6936b17..3d969a2 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -23,7 +23,7 @@ pub trait Transport: // ) -> Poll>>>; } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Connection where T: Debug,