diff options
author | Steven Fackler <sfackler@gmail.com> | 2020-06-05 13:33:13 -0700 |
---|---|---|
committer | Steven Fackler <sfackler@gmail.com> | 2020-06-05 13:33:13 -0700 |
commit | 24af7de14c5e1767a64157ed16398e3ae2acb3e1 (patch) | |
tree | e19a24c8a6964cac08114e6c5df2e6c76610ab5c /openssl/src | |
parent | 639c8af5c1fada79976f4166ac56f6cd1f87e9b8 (diff) | |
download | rust-openssl-24af7de14c5e1767a64157ed16398e3ae2acb3e1.zip |
fix clippy
Diffstat (limited to 'openssl/src')
-rw-r--r-- | openssl/src/envelope.rs | 1 | ||||
-rw-r--r-- | openssl/src/error.rs | 1 | ||||
-rw-r--r-- | openssl/src/stack.rs | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/openssl/src/envelope.rs b/openssl/src/envelope.rs index 22a14117..bd4e1b43 100644 --- a/openssl/src/envelope.rs +++ b/openssl/src/envelope.rs @@ -92,6 +92,7 @@ impl Seal { } /// Returns the initialization vector, if the cipher uses one. + #[allow(clippy::option_as_ref_deref)] pub fn iv(&self) -> Option<&[u8]> { self.iv.as_ref().map(|v| &**v) } diff --git a/openssl/src/error.rs b/openssl/src/error.rs index c1ef043e..55567e2b 100644 --- a/openssl/src/error.rs +++ b/openssl/src/error.rs @@ -229,6 +229,7 @@ impl Error { } /// Returns additional data describing the error. + #[allow(clippy::option_as_ref_deref)] pub fn data(&self) -> Option<&str> { self.data.as_ref().map(|s| &**s) } diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index fc2eafae..d70be351 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -46,7 +46,7 @@ unsafe impl<T: Stackable + Sync> Sync for Stack<T> {} impl<T: Stackable> Drop for Stack<T> { fn drop(&mut self) { unsafe { - while let Some(_) = self.pop() {} + while self.pop().is_some() {} OPENSSL_sk_free(self.0 as *mut _); } } |