From f69ee652e6f28994c55850a3f546b84bae8dfa92 Mon Sep 17 00:00:00 2001 From: Kirill Mironov Date: Wed, 11 Sep 2019 20:22:04 +0300 Subject: [PATCH] tls: fix new temporary lifetime rustc error [E0597] (#1547) Fixes: #1546 Signed-off-by: Kirill Mironov --- tokio-tls/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-tls/src/lib.rs b/tokio-tls/src/lib.rs index 1af689f9d..2b131ceca 100644 --- a/tokio-tls/src/lib.rs +++ b/tokio-tls/src/lib.rs @@ -287,7 +287,7 @@ impl TlsConnector { where S: AsyncRead + AsyncWrite + Unpin, { - handshake(|s| self.0.connect(domain, s), stream).await + handshake(move |s| self.0.connect(domain, s), stream).await } } @@ -318,7 +318,7 @@ impl TlsAcceptor { where S: AsyncRead + AsyncWrite + Unpin, { - handshake(|s| self.0.accept(s), stream).await + handshake(move |s| self.0.accept(s), stream).await } }