Skip to content

Commit d59ecb0

Browse files
committed
Fixed NEW clippy complaint.
Signed-off-by: Mike Smoot <mes@aescon.com>
1 parent b459b70 commit d59ecb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

psa-crypto/src/operations/cipher.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn crypt(
3232

3333
let mut output_length = 0;
3434
let mut output_length_finish = 0;
35-
match (|| {
35+
let mut inner_crypt = || {
3636
Status::from(unsafe {
3737
psa_crypto_sys::psa_cipher_set_iv(&mut operation, iv.as_ptr(), iv.len())
3838
})
@@ -61,7 +61,8 @@ fn crypt(
6161
.to_result()?;
6262

6363
Ok(())
64-
})() {
64+
};
65+
match inner_crypt() {
6566
Ok(()) => (),
6667
Err(x) => {
6768
Status::from(unsafe { psa_crypto_sys::psa_cipher_abort(&mut operation) })

0 commit comments

Comments
 (0)