Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Jun 11, 2024
1 parent 998d97d commit 48e1f00
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/web5/src/credentials/verifiable_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ impl VerifiableCredential {
let issuer_obj: Issuer = match issuer {
Value::String(s) => Issuer::String(s.clone()),
Value::Object(_o) => {
let named_issuer: NamedIssuer =
serde_json::from_value(issuer.clone()).unwrap();
let named_issuer: NamedIssuer = serde_json::from_value(issuer.clone()).unwrap();
Issuer::Object(named_issuer)
}
_ => return Err(CredentialError::ClaimMismatch("issuer".to_string())),
Expand Down Expand Up @@ -449,7 +448,7 @@ impl VerifiableCredential {

let now = Utc::now().timestamp();
match vc_payload.get("expiration_date") {
Some(ref vc_payload_expiration_date) => match exp {
Some(vc_payload_expiration_date) => match exp {
None => {
return Err(CredentialError::MisconfiguredExpirationDate(
"VC has expiration date but no exp in registered claims".to_string(),
Expand Down

0 comments on commit 48e1f00

Please sign in to comment.