Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate committed Aug 20, 2024
1 parent b07b715 commit fcb4ed9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/authorization_request/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ impl Deref for Nonce {
}
}

impl ToString for Nonce {
fn to_string(&self) -> String {
self.0.clone()
impl std::fmt::Display for Nonce {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/authorization_request/verification/did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub async fn verify_with_resolver(
.await
.context("unable to resolve key from verification method")?;

let _: Json = ssi_claims::jwt::decode_verify(&request_jwt, &*jwk)
let _: Json = ssi_claims::jwt::decode_verify(&request_jwt, &jwk)
.context("request signature could not be verified")?;

Ok(())
Expand Down
5 changes: 5 additions & 0 deletions src/core/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ impl WalletMetadata {
&self.2
}

/// Returns whether the claim format is supported.
pub fn is_claim_format_supported(&self, designation: &ClaimFormatDesignation) -> bool {
self.vp_formats_supported().0.contains_key(designation)
}

/// The static wallet metadata bound to `openid4vp:`:
/// ```json
/// {
Expand Down

0 comments on commit fcb4ed9

Please sign in to comment.