From 8ba1f6802587a3699341a0edcd2435c7ad09b684 Mon Sep 17 00:00:00 2001 From: Frederik Rothenberger Date: Wed, 22 Nov 2023 14:57:36 +0100 Subject: [PATCH] Clippy fixes --- demos/vc_issuer/src/main.rs | 3 +-- demos/vc_issuer/tests/issue_credential.rs | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/demos/vc_issuer/src/main.rs b/demos/vc_issuer/src/main.rs index 3ea7fc2b09..11b1ef28f8 100644 --- a/demos/vc_issuer/src/main.rs +++ b/demos/vc_issuer/src/main.rs @@ -122,7 +122,7 @@ fn apply_config(init: IssuerInit) { } fn authorize_vc_request(alias: &SignedIdAlias) -> Result { - let alias_tuple = extract_id_alias(&alias)?; + let alias_tuple = extract_id_alias(alias)?; if caller() != alias_tuple.id_dapp { return Err(IssueCredentialError::UnauthorizedSubject(format!( @@ -304,7 +304,6 @@ fn verify_single_argument( let unexpected_arguments: Vec<&String> = arguments .keys() - .into_iter() .filter(|k| k.as_str() != expected_argument) .collect(); if !unexpected_arguments.is_empty() { diff --git a/demos/vc_issuer/tests/issue_credential.rs b/demos/vc_issuer/tests/issue_credential.rs index b676ddc602..c0833b2ab2 100644 --- a/demos/vc_issuer/tests/issue_credential.rs +++ b/demos/vc_issuer/tests/issue_credential.rs @@ -562,14 +562,13 @@ fn should_issue_credential_e2e() -> Result<(), CallError> { alias_tuple.id_dapp, )?; - for credential_spec in vec![employee_credential_spec(), degree_credential_spec()] { + for credential_spec in [employee_credential_spec(), degree_credential_spec()] { let prepare_credential_response = api::prepare_credential( &env, issuer_id, id_alias_credentials .issuer_id_alias_credential - .id_dapp - .clone(), + .id_dapp, &PrepareCredentialRequest { credential_spec: credential_spec.clone(), signed_id_alias: SignedIssuerIdAlias { @@ -595,8 +594,7 @@ fn should_issue_credential_e2e() -> Result<(), CallError> { issuer_id, id_alias_credentials .issuer_id_alias_credential - .id_dapp - .clone(), + .id_dapp, &GetCredentialRequest { credential_spec: credential_spec.clone(), signed_id_alias: SignedIssuerIdAlias {