Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Rothenberger committed Nov 22, 2023
1 parent 098d4f0 commit 8ba1f68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions demos/vc_issuer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fn apply_config(init: IssuerInit) {
}

fn authorize_vc_request(alias: &SignedIdAlias) -> Result<AliasTuple, IssueCredentialError> {
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!(
Expand Down Expand Up @@ -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() {
Expand Down
8 changes: 3 additions & 5 deletions demos/vc_issuer/tests/issue_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 8ba1f68

Please sign in to comment.