diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-02-29 01:44:48 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-29 01:44:48 +0000 |
commit | 840a062c1f5f8ba4b694d4da2d31c5ae3d827d21 (patch) | |
tree | ec3d0fa45a14d405d282a516dce615b37d69a71b | |
parent | 6163cfb24c33f8ff9306d70863e2b4782b8225a9 (diff) | |
parent | d25c50c909217eac4df5e28b5ec57406f0986789 (diff) | |
download | security-840a062c1f5f8ba4b694d4da2d31c5ae3d827d21.tar.gz |
Merge "Fix style warnings for rustc 1.76.0" into main am: d25c50c909
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2983289
Change-Id: I56a4c76b182c34152fdc7f83145c07b11dd23ac3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | keystore2/legacykeystore/lib.rs | 5 | ||||
-rw-r--r-- | keystore2/src/database.rs | 5 | ||||
-rw-r--r-- | keystore2/src/security_level.rs | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/keystore2/legacykeystore/lib.rs b/keystore2/legacykeystore/lib.rs index f7a81983..db3eff63 100644 --- a/keystore2/legacykeystore/lib.rs +++ b/keystore2/legacykeystore/lib.rs @@ -55,7 +55,7 @@ impl DB { F: Fn(&Transaction) -> Result<T>, { loop { - match self + let result = self .conn .transaction_with_behavior(behavior) .context("In with_transaction.") @@ -63,7 +63,8 @@ impl DB { .and_then(|(result, tx)| { tx.commit().context("In with_transaction: Failed to commit transaction.")?; Ok(result) - }) { + }); + match result { Ok(result) => break Ok(result), Err(e) => { if Self::is_locked_error(&e) { diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs index b526daac..2757313f 100644 --- a/keystore2/src/database.rs +++ b/keystore2/src/database.rs @@ -1467,7 +1467,7 @@ impl KeystoreDB { F: Fn(&Transaction) -> Result<(bool, T)>, { loop { - match self + let result = self .conn .transaction_with_behavior(behavior) .context(ks_err!()) @@ -1475,7 +1475,8 @@ impl KeystoreDB { .and_then(|(result, tx)| { tx.commit().context(ks_err!("Failed to commit transaction."))?; Ok(result) - }) { + }); + match result { Ok(result) => break Ok(result), Err(e) => { if Self::is_locked_error(&e) { diff --git a/keystore2/src/security_level.rs b/keystore2/src/security_level.rs index 6fb0eb20..5f9745f0 100644 --- a/keystore2/src/security_level.rs +++ b/keystore2/src/security_level.rs @@ -927,7 +927,7 @@ impl KeystoreSecurityLevel { .context(ks_err!("Check permission"))?; let km_dev = &self.keymint; - match { + let res = { let _wp = self.watch_millis( concat!( "In IKeystoreSecurityLevel::convert_storage_key_to_ephemeral: ", @@ -936,7 +936,8 @@ impl KeystoreSecurityLevel { 500, ); map_km_error(km_dev.convertStorageKeyToEphemeral(key_blob)) - } { + }; + match res { Ok(result) => { Ok(EphemeralStorageKeyResponse { ephemeralKey: result, upgradedBlob: None }) } |