Derive Copy on RequestData

This commit is contained in:
Dirkjan Ochtman 2022-02-05 22:07:53 +01:00
parent c9f9ea1fea
commit 9d420ad20b
1 changed files with 13 additions and 0 deletions

View File

@ -180,6 +180,19 @@ impl<'c, 'e, C: Command, E: Extension> From<(&'c C, &'e E)> for RequestData<'c,
} }
} }
// Manual impl because this does not depend on whether `C` and `E` are `Clone`
impl<'c, 'e, C, E> Clone for RequestData<'c, 'e, C, E> {
fn clone(&self) -> Self {
Self {
command: self.command,
extension: self.extension,
}
}
}
// Manual impl because this does not depend on whether `C` and `E` are `Copy`
impl<'c, 'e, C, E> Copy for RequestData<'c, 'e, C, E> {}
#[cfg(feature = "tokio-rustls")] #[cfg(feature = "tokio-rustls")]
pub struct RustlsConnector { pub struct RustlsConnector {
inner: TlsConnector, inner: TlsConnector,