-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: address Rust 1.85.0 clippy lints #7376
base: main
Are you sure you want to change the base?
Conversation
@@ -197,7 +197,7 @@ impl CustomerCreateBridge for customers::CustomerRequest { | |||
customer: &'a domain::Customer, | |||
) -> errors::CustomerResponse<customers::CustomerResponse> { | |||
let address = self.get_address(); | |||
let address_details = address.map(api_models::payments::AddressDetails::from); | |||
let address_details = address; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this unnecessary assignment
@@ -1265,7 +1265,7 @@ impl CustomerUpdateBridge for customers::CustomerUpdateRequest { | |||
customer: &'a domain::Customer, | |||
) -> errors::CustomerResponse<customers::CustomerResponse> { | |||
let address = self.get_address(); | |||
let address_details = address.map(api_models::payments::AddressDetails::from); | |||
let address_details = address; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this unnecessary assignment
@@ -283,7 +283,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest> | |||
payment_intent.metadata = request.metadata.clone().or(payment_intent.metadata); | |||
|
|||
// The operation merges mandate data from both request and payment_attempt | |||
let setup_mandate = mandate_data.map(Into::into); | |||
let setup_mandate = mandate_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this unnecessary assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub struct PaymentData
where
F: Clone,
{
pub flow: PhantomData,
pub payment_intent: storage::PaymentIntent,
............................
pub setup_mandate: Option,
pub customer_acceptance: Option,
..........................,
}
setup-mandate is described in PaymentData should I change this to mandate_data?
Doing this will break other things
@@ -493,7 +493,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest> | |||
.transpose()?; | |||
|
|||
// The operation merges mandate data from both request and payment_attempt | |||
let setup_mandate = mandate_data.map(MandateData::from); | |||
let setup_mandate = mandate_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this unnecessary assignment
@@ -421,7 +421,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest> | |||
.transpose()?; | |||
|
|||
// The operation merges mandate data from both request and payment_attempt | |||
let setup_mandate = mandate_data.map(Into::into); | |||
let setup_mandate = mandate_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this unnecessary assignment
@@ -165,7 +165,7 @@ impl From<diesel_models::role::Role> for RoleInfo { | |||
Self { | |||
role_id: role.role_id, | |||
role_name: role.role_name, | |||
groups: role.groups.into_iter().map(Into::into).collect(), | |||
groups: role.groups.into_iter().collect(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groups: role.groups.into_iter().collect(), | |
groups: role.groups, |
Type of Change
Description
This PR addresses the clippy lints occurring due to new rust version 1.85.0
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Additional Changes
Checklist
cargo +nightly fmt --all
cargo clippy