summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-02-29 01:05:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-02-29 01:05:11 +0000
commitd25c50c909217eac4df5e28b5ec57406f0986789 (patch)
treeec3d0fa45a14d405d282a516dce615b37d69a71b
parent94646d7d190918036401fd4d63b44a9d357bc7d1 (diff)
parentefe1a2fb73c50b5886a7442a9fdd66fa70b8adb5 (diff)
downloadsecurity-d25c50c909217eac4df5e28b5ec57406f0986789.tar.gz
Merge "Fix style warnings for rustc 1.76.0" into main
-rw-r--r--keystore2/legacykeystore/lib.rs5
-rw-r--r--keystore2/src/database.rs5
-rw-r--r--keystore2/src/security_level.rs5
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 })
}