mirror of
https://github.com/tokio-rs/axum.git
synced 2025-03-13 19:27:53 +01:00
Implement Clone
for IntoMakeServiceWithConnectInfo
(#471)
Fixes https://github.com/tokio-rs/axum/issues/470
This commit is contained in:
parent
b4b022da5f
commit
b3b377d467
2 changed files with 15 additions and 1 deletions
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue