Use into for infallible conversions

This commit is contained in:
Steven Fackler 2019-03-01 12:36:01 -08:00
parent effd08114a
commit 404670691c
1 changed files with 2 additions and 2 deletions

View File

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