Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9b3f47

Browse files
committed
Change Handshake trait to not consume itself on use.
1 parent b171da3 commit b9b3f47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tokio-postgres/src/tls/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl TlsStream for Stream {
3232
pub trait Handshake: 'static + Sync + Send {
3333
/// Performs a TLS handshake, returning a wrapped stream.
3434
fn handshake(
35-
self: Box<Self>,
35+
&self,
3636
host: &str,
3737
stream: Stream,
3838
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send>;

tokio-postgres/src/tls/openssl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl From<SslConnector> for OpenSsl {
4040

4141
impl Handshake for OpenSsl {
4242
fn handshake(
43-
self: Box<Self>,
43+
&self,
4444
host: &str,
4545
stream: Stream,
4646
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send> {

0 commit comments

Comments
 (0)