From 504b9b4885e06bdf7d48494de3c23e137c02e700 Mon Sep 17 00:00:00 2001 From: Zhang Jingqiang Date: Thu, 1 Feb 2024 14:29:37 +0800 Subject: [PATCH] fix clippy warning --- openssl/src/ssl/mod.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index b8be07ea..5656e841 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1646,14 +1646,7 @@ impl SslContextBuilder { #[corresponds(SSL_CTX_ct_is_enabled)] #[cfg(ossl111)] pub fn ct_is_enabled(&self) -> bool { - unsafe { - let r = ffi::SSL_CTX_ct_is_enabled(self.as_ptr()); - if r == 1 { - true - } else { - false - } - } + unsafe { ffi::SSL_CTX_ct_is_enabled(self.as_ptr()) == 1 } } /// Sets the status response a client wishes the server to reply with. @@ -3385,14 +3378,7 @@ impl SslRef { #[corresponds(SSL_ct_is_enabled)] #[cfg(ossl111)] pub fn ct_is_enabled(&self) -> bool { - unsafe { - let r = ffi::SSL_ct_is_enabled(self.as_ptr()); - if r == 1 { - true - } else { - false - } - } + unsafe { ffi::SSL_ct_is_enabled(self.as_ptr()) == 1 } } /// Sets the status response a client wishes the server to reply with.