Skip to content

Commit

Permalink
Fixed NEW clippy complaint.
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Smoot <[email protected]>
  • Loading branch information
mes5k committed Mar 18, 2024
1 parent b459b70 commit d59ecb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions psa-crypto/src/operations/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn crypt(

let mut output_length = 0;
let mut output_length_finish = 0;
match (|| {
let mut inner_crypt = || {
Status::from(unsafe {
psa_crypto_sys::psa_cipher_set_iv(&mut operation, iv.as_ptr(), iv.len())
})
Expand Down Expand Up @@ -61,7 +61,8 @@ fn crypt(
.to_result()?;

Ok(())
})() {
};
match inner_crypt() {
Ok(()) => (),
Err(x) => {
Status::from(unsafe { psa_crypto_sys::psa_cipher_abort(&mut operation) })
Expand Down

0 comments on commit d59ecb0

Please sign in to comment.