tls: fix new temporary lifetime rustc error [E0597] (#1547)

Fixes: #1546
Signed-off-by: Kirill Mironov <vetrokm@gmail.com>
This commit is contained in:
Kirill Mironov 2019-09-11 20:22:04 +03:00 committed by Sean McArthur
parent 9b3f8564af
commit f69ee652e6

View File

@ -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
}
}