fix clippy
This commit is contained in:
parent
639c8af5c1
commit
24af7de14c
|
|
@ -54,7 +54,7 @@ jobs:
|
|||
with:
|
||||
path: target
|
||||
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
|
||||
- name: Run clippy clippy
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all --all-targets
|
||||
|
||||
min-version:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 _);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue