diff --git a/bin/verify-era-proof-attestation/src/proof/types.rs b/bin/verify-era-proof-attestation/src/proof/types.rs index af3e905..e2362e6 100644 --- a/bin/verify-era-proof-attestation/src/proof/types.rs +++ b/bin/verify-era-proof-attestation/src/proof/types.rs @@ -61,12 +61,12 @@ impl Proof { pub fn is_permanently_ignored(&self) -> bool { self.status .as_ref() - .map_or(false, |s| s.eq_ignore_ascii_case("permanently_ignored")) + .is_some_and(|s| s.eq_ignore_ascii_case("permanently_ignored")) } /// Check if the proof is failed or picked by a prover pub fn is_failed_or_picked(&self) -> bool { - self.status.as_ref().map_or(false, |s| { + self.status.as_ref().is_some_and(|s| { s.eq_ignore_ascii_case("failed") || s.eq_ignore_ascii_case("picked_by_prover") }) } diff --git a/crates/teepot-vault/src/client/mod.rs b/crates/teepot-vault/src/client/mod.rs index f254fd8..97625d7 100644 --- a/crates/teepot-vault/src/client/mod.rs +++ b/crates/teepot-vault/src/client/mod.rs @@ -222,7 +222,7 @@ impl TeeConnection { if self .args .sgx_allowed_tcb_levels - .map_or(true, |levels| !levels.contains(tcblevel)) + .is_none_or(|levels| !levels.contains(tcblevel)) { error!("Quote verification result: {}", tcblevel); return Err(Error::General(format!( diff --git a/crates/teepot-vault/src/client/vault.rs b/crates/teepot-vault/src/client/vault.rs index 42cfbae..c3cf4ad 100644 --- a/crates/teepot-vault/src/client/vault.rs +++ b/crates/teepot-vault/src/client/vault.rs @@ -297,7 +297,7 @@ impl VaultConnection { } /// set a secret in the vault - pub async fn store_secret<'de, T: serde::Serialize>( + pub async fn store_secret( &self, val: T, rel_path: &str, @@ -306,7 +306,7 @@ impl VaultConnection { } /// set a secret in the vault for a different TEE - pub async fn store_secret_for_tee<'de, T: serde::Serialize>( + pub async fn store_secret_for_tee( &self, tee_name: &str, val: T, @@ -330,7 +330,7 @@ impl VaultConnection { } /// get a secret from the vault - pub async fn load_secret<'de, T: serde::de::DeserializeOwned>( + pub async fn load_secret( &self, rel_path: &str, ) -> Result, HttpResponseError> { @@ -338,7 +338,7 @@ impl VaultConnection { } /// get a secret from the vault for a specific TEE - pub async fn load_secret_for_tee<'de, T: serde::de::DeserializeOwned>( + pub async fn load_secret_for_tee( &self, tee_name: &str, rel_path: &str, diff --git a/crates/teepot/src/quote/attestation.rs b/crates/teepot/src/quote/attestation.rs index 4f00065..371545c 100644 --- a/crates/teepot/src/quote/attestation.rs +++ b/crates/teepot/src/quote/attestation.rs @@ -81,7 +81,7 @@ pub fn get_quote_and_collateral( } if tcblevel != TcbLevel::Ok - && allowed_tcb_levels.map_or(false, |levels| !levels.contains(tcblevel)) + && allowed_tcb_levels.is_some_and(|levels| !levels.contains(tcblevel)) { error!("Quote verification result: {}", tcblevel); bail!("Quote verification result: {}", tcblevel); diff --git a/flake.lock b/flake.lock index 643b08f..62f2b11 100644 --- a/flake.lock +++ b/flake.lock @@ -234,11 +234,11 @@ ] }, "locked": { - "lastModified": 1734661750, - "narHash": "sha256-BI58NBdimxu1lnpOrG9XxBz7Cwqy+qIf99zunWofX5w=", + "lastModified": 1743993291, + "narHash": "sha256-u8GHvduU1gCtoFXvTS/wGjH1ouv5S/GRGq6MAT+sG/k=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7d3d910d5fd575e6e8c5600d83d54e5c47273bfe", + "rev": "0cb3c8979c65dc6a5812dfe67499a8c7b8b4325b", "type": "github" }, "original": { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index dbe555f..a237e46 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.83" +channel = "1.86" components = ["rustfmt", "clippy", "rust-src"]