From a3cb1c22d9a282543b9af8d0f215eac1479fbf35 Mon Sep 17 00:00:00 2001 From: Julien Rolland Date: Mon, 23 Nov 2015 21:59:54 +0000 Subject: [PATCH] SslStream::new is deprecated --- src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 9baa21d..a1206ac 100644 --- a/src/client.rs +++ b/src/client.rs @@ -33,7 +33,7 @@ impl IMAPStream { let connect_string = format!("{}:{}", host_string, port); let tcp_stream = TcpStream::connect(&*connect_string).unwrap(); let mut socket = match ssl_context { - Some(context) => IMAPStream { stream: IMAPStreamTypes::Ssl(SslStream::new(&context, tcp_stream).unwrap()), host: host_string, port: port, tag: 1, tag_prefix: "a"}, + Some(context) => IMAPStream { stream: IMAPStreamTypes::Ssl(SslStream::connect(&context, tcp_stream).unwrap()), host: host_string, port: port, tag: 1, tag_prefix: "a"}, None => IMAPStream { stream: IMAPStreamTypes::Basic(tcp_stream), host: host_string, port: port, tag: 1, tag_prefix: "a"}, };