diff options
author | James Farrell <jamesfarrell@google.com> | 2024-02-28 21:36:47 +0000 |
---|---|---|
committer | James Farrell <jamesfarrell@google.com> | 2024-02-28 21:53:07 +0000 |
commit | efe1a2fb73c50b5886a7442a9fdd66fa70b8adb5 (patch) | |
tree | ec3d0fa45a14d405d282a516dce615b37d69a71b | |
parent | 94646d7d190918036401fd4d63b44a9d357bc7d1 (diff) | |
download | security-efe1a2fb73c50b5886a7442a9fdd66fa70b8adb5.tar.gz |
Fix style warnings for rustc 1.76.0
Test: Built with test_compiler.py
Bug: 327204642
Change-Id: I95f8965cb1db564fb3c86b4529aa707d1b75fd78
-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 }) } |