Derive Copy on RequestData

This commit is contained in:
Dirkjan Ochtman 2022-02-05 22:07:53 +01:00 committed by masalachai
parent 386638b6ca
commit 53c240be21
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")]
pub struct RustlsConnector {
inner: TlsConnector,