Skip to content

Commit

Permalink
Implement Clone for ChainedConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey authored and algesten committed Feb 1, 2025
1 parent bac2bd4 commit 2e25889
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/unversioned/transport/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ where
}
}

impl<In, First, Second> Clone for ChainedConnector<In, First, Second>
where
In: Transport,
First: Connector<In> + Clone,
Second: Connector<First::Out> + Clone,
{
fn clone(&self) -> Self {
ChainedConnector(self.0.clone(), self.1.clone(), PhantomData)
}
}

/// A selection between two transports.
#[derive(Debug)]
pub enum Either<A, B> {
Expand Down

0 comments on commit 2e25889

Please sign in to comment.