From 404670691c92958f52cda1e689a928539d61f05a Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Fri, 1 Mar 2019 12:36:01 -0800 Subject: [PATCH] Use into for infallible conversions --- openssl/src/ssl/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 134ac5a8..f433f74d 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -2157,7 +2157,7 @@ impl SslSessionRef { /// /// [`SSL_SESSION_get_time`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html pub fn time(&self) -> i64 { - unsafe { ffi::SSL_SESSION_get_time(self.as_ptr()) as i64 } + unsafe { ffi::SSL_SESSION_get_time(self.as_ptr()).into() } } /// Returns the sessions timeout, in seconds. @@ -2168,7 +2168,7 @@ impl SslSessionRef { /// /// [`SSL_SESSION_get_timeout`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html pub fn timeout(&self) -> i64 { - unsafe { ffi::SSL_SESSION_get_timeout(self.as_ptr()) as i64 } + unsafe { ffi::SSL_SESSION_get_timeout(self.as_ptr()).into() } } /// Returns the session's TLS protocol version.