mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
chore: enable clippy::trivially_copy_pass_by_ref lint and address it (#6724)
This commit is contained in:
@ -395,7 +395,7 @@ impl<T: DatabaseStore> PayoutAttemptInterface for crate::RouterStore<T> {
|
||||
.insert(&conn)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
.map(PayoutAttempt::from_storage_model)
|
||||
@ -415,7 +415,7 @@ impl<T: DatabaseStore> PayoutAttemptInterface for crate::RouterStore<T> {
|
||||
.update_with_attempt_id(&conn, payout.to_storage_model())
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
.map(PayoutAttempt::from_storage_model)
|
||||
@ -437,7 +437,7 @@ impl<T: DatabaseStore> PayoutAttemptInterface for crate::RouterStore<T> {
|
||||
.await
|
||||
.map(PayoutAttempt::from_storage_model)
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
}
|
||||
@ -458,7 +458,7 @@ impl<T: DatabaseStore> PayoutAttemptInterface for crate::RouterStore<T> {
|
||||
.await
|
||||
.map(PayoutAttempt::from_storage_model)
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
}
|
||||
@ -479,7 +479,7 @@ impl<T: DatabaseStore> PayoutAttemptInterface for crate::RouterStore<T> {
|
||||
DieselPayoutAttempt::get_filters_for_payouts(&conn, payouts.as_slice(), merchant_id)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
.map(
|
||||
|
||||
@ -235,7 +235,7 @@ impl<T: DatabaseStore> PayoutsInterface for KVRouterStore<T> {
|
||||
DieselPayouts::find_by_merchant_id_payout_id(&conn, merchant_id, payout_id)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
};
|
||||
@ -283,7 +283,7 @@ impl<T: DatabaseStore> PayoutsInterface for KVRouterStore<T> {
|
||||
DieselPayouts::find_optional_by_merchant_id_payout_id(&conn, merchant_id, payout_id)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
};
|
||||
@ -423,7 +423,7 @@ impl<T: DatabaseStore> PayoutsInterface for crate::RouterStore<T> {
|
||||
.insert(&conn)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
.map(Payouts::from_storage_model)
|
||||
@ -443,7 +443,7 @@ impl<T: DatabaseStore> PayoutsInterface for crate::RouterStore<T> {
|
||||
.update(&conn, payout.to_storage_model())
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
.map(Payouts::from_storage_model)
|
||||
@ -461,7 +461,7 @@ impl<T: DatabaseStore> PayoutsInterface for crate::RouterStore<T> {
|
||||
.await
|
||||
.map(Payouts::from_storage_model)
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
}
|
||||
@ -478,7 +478,7 @@ impl<T: DatabaseStore> PayoutsInterface for crate::RouterStore<T> {
|
||||
.await
|
||||
.map(|x| x.map(Payouts::from_storage_model))
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
}
|
||||
@ -814,7 +814,7 @@ impl<T: DatabaseStore> PayoutsInterface for crate::RouterStore<T> {
|
||||
)
|
||||
.await
|
||||
.map_err(|er| {
|
||||
let new_err = diesel_error_to_data_error(er.current_context());
|
||||
let new_err = diesel_error_to_data_error(*er.current_context());
|
||||
er.change_context(new_err)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user