From 938fdd71374b040609cdf3d2a8e1f28abbf15203 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 23 Oct 2016 21:54:49 -0700 Subject: [PATCH] Add into_error --- openssl/src/ssl/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 92e0c159..3327ff22 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1254,6 +1254,11 @@ impl MidHandshakeSslStream { &self.error } + /// Consumes `self`, returning its error. + pub fn into_error(self) -> Error { + self.error + } + /// Restarts the handshake process. pub fn handshake(mut self) -> Result, HandshakeError> { let ret = unsafe { ffi::SSL_do_handshake(self.stream.ssl.as_ptr()) };