mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-21 00:00:14 +02:00
Implement Clone for IntoMakeServiceWithConnectInfo (#471)
Fixes https://github.com/tokio-rs/axum/issues/470
This commit is contained in:
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
# Unreleased
|
||||
|
||||
- None
|
||||
- **fixed:** Implement `Clone` for `IntoMakeServiceWithConnectInfo` ([#471])
|
||||
|
||||
[#471]: https://github.com/tokio-rs/axum/pull/471
|
||||
|
||||
# 0.3.0 (02. November, 2021)
|
||||
|
||||
|
||||
@@ -56,6 +56,18 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<S, C> Clone for IntoMakeServiceWithConnectInfo<S, C>
|
||||
where
|
||||
S: Clone,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
svc: self.svc.clone(),
|
||||
_connect_info: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait that connected IO resources implement and use to produce information
|
||||
/// about the connection.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user