From d2e8283a838e9c5fcb58bdb50d210273c7ec77ef Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 5 Sep 2024 15:09:51 +0100 Subject: [PATCH] Clippy --- src/client.rs | 4 ++-- src/core/profiles/jwt_vc_json/credential_request.rs | 6 ++++++ src/core/profiles/ldp_vc/credential_request.rs | 6 ++++++ src/core/profiles/mso_mdoc/credential_request.rs | 6 ++++++ src/metadata/authorization_server.rs | 4 ++-- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/client.rs b/src/client.rs index 4561ffa..2d15089 100644 --- a/src/client.rs +++ b/src/client.rs @@ -161,12 +161,12 @@ where pre_authorized_code: PreAuthorizedCode, ) -> PreAuthorizedCodeTokenRequest<'_, BasicErrorResponse, token::Response> { PreAuthorizedCodeTokenRequest { - auth_type: &self.inner.auth_type(), + auth_type: self.inner.auth_type(), client_id: Some(self.inner.client_id()), client_secret: None, code: pre_authorized_code, extra_params: Vec::new(), - token_url: &self.inner.token_uri(), + token_url: self.inner.token_uri(), tx_code: None, _phantom: PhantomData, } diff --git a/src/core/profiles/jwt_vc_json/credential_request.rs b/src/core/profiles/jwt_vc_json/credential_request.rs index 7b1f3ae..04ecc47 100644 --- a/src/core/profiles/jwt_vc_json/credential_request.rs +++ b/src/core/profiles/jwt_vc_json/credential_request.rs @@ -31,6 +31,12 @@ impl CredentialRequestProfile for CredentialRequestWithFormat { #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct CredentialRequest {} +impl Default for CredentialRequest { + fn default() -> Self { + Self::new() + } +} + impl CredentialRequest { pub fn new() -> Self { Self {} diff --git a/src/core/profiles/ldp_vc/credential_request.rs b/src/core/profiles/ldp_vc/credential_request.rs index 7a03302..174607f 100644 --- a/src/core/profiles/ldp_vc/credential_request.rs +++ b/src/core/profiles/ldp_vc/credential_request.rs @@ -39,6 +39,12 @@ where #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct CredentialRequest {} +impl Default for CredentialRequest { + fn default() -> Self { + Self::new() + } +} + impl CredentialRequest { pub fn new() -> Self { Self {} diff --git a/src/core/profiles/mso_mdoc/credential_request.rs b/src/core/profiles/mso_mdoc/credential_request.rs index dbc5f9f..ed1983a 100644 --- a/src/core/profiles/mso_mdoc/credential_request.rs +++ b/src/core/profiles/mso_mdoc/credential_request.rs @@ -43,6 +43,12 @@ pub struct CredentialRequest { claims: Claims, } +impl Default for CredentialRequest { + fn default() -> Self { + Self::new() + } +} + impl CredentialRequest { pub fn new() -> Self { Self { diff --git a/src/metadata/authorization_server.rs b/src/metadata/authorization_server.rs index 7538cc6..b698435 100644 --- a/src/metadata/authorization_server.rs +++ b/src/metadata/authorization_server.rs @@ -128,7 +128,7 @@ impl AuthorizationServerMetadata { CM: CredentialConfigurationProfile, { let credential_issuer_authorization_server_metadata = - Self::discover(&credential_issuer_metadata.credential_issuer(), http_client); + Self::discover(credential_issuer_metadata.credential_issuer(), http_client); let Some(grant_type) = grant_type else { // If grants is not present or is empty, the Wallet MUST determine the Grant Types the // Credential Issuer's Authorization Server supports using the respective metadata. @@ -190,7 +190,7 @@ impl AuthorizationServerMetadata { CM: CredentialConfigurationProfile, { let credential_issuer_authorization_server_metadata = - Self::discover_async(&credential_issuer_metadata.credential_issuer(), http_client) + Self::discover_async(credential_issuer_metadata.credential_issuer(), http_client) .await; let Some(grant_type) = grant_type else { // If grants is not present or is empty, the Wallet MUST determine the Grant Types the