mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
chore: address Rust 1.89.0 clippy lints (#8873)
This commit is contained in:
@ -301,35 +301,6 @@ impl Parse for Rule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
|
||||||
enum Scope {
|
|
||||||
Crate,
|
|
||||||
Extern,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Parse for Scope {
|
|
||||||
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
|
|
||||||
let lookahead = input.lookahead1();
|
|
||||||
if lookahead.peek(Token![crate]) {
|
|
||||||
input.parse::<Token![crate]>()?;
|
|
||||||
Ok(Self::Crate)
|
|
||||||
} else if lookahead.peek(Token![extern]) {
|
|
||||||
input.parse::<Token![extern]>()?;
|
|
||||||
Ok(Self::Extern)
|
|
||||||
} else {
|
|
||||||
Err(lookahead.error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Display for Scope {
|
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
|
||||||
match self {
|
|
||||||
Self::Crate => write!(f, "crate"),
|
|
||||||
Self::Extern => write!(f, "euclid"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct Program {
|
struct Program {
|
||||||
rules: Vec<Rc<Rule>>,
|
rules: Vec<Rc<Rule>>,
|
||||||
|
|||||||
@ -784,10 +784,11 @@ where
|
|||||||
payment_data = match connector_details {
|
payment_data = match connector_details {
|
||||||
ConnectorCallType::PreDetermined(ref connector) => {
|
ConnectorCallType::PreDetermined(ref connector) => {
|
||||||
#[cfg(all(feature = "dynamic_routing", feature = "v1"))]
|
#[cfg(all(feature = "dynamic_routing", feature = "v1"))]
|
||||||
let routable_connectors =
|
let routable_connectors = convert_connector_data_to_routable_connectors(
|
||||||
convert_connector_data_to_routable_connectors(&[connector.clone()])
|
std::slice::from_ref(connector),
|
||||||
.map_err(|e| logger::error!(routable_connector_error=?e))
|
)
|
||||||
.unwrap_or_default();
|
.map_err(|e| logger::error!(routable_connector_error=?e))
|
||||||
|
.unwrap_or_default();
|
||||||
let schedule_time = if should_add_task_to_process_tracker {
|
let schedule_time = if should_add_task_to_process_tracker {
|
||||||
payment_sync::get_sync_process_schedule_time(
|
payment_sync::get_sync_process_schedule_time(
|
||||||
&*state.store,
|
&*state.store,
|
||||||
|
|||||||
@ -400,12 +400,12 @@ pub async fn connect_account(
|
|||||||
logger::info!(?welcome_email_result);
|
logger::info!(?welcome_email_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(ApplicationResponse::Json(
|
Ok(ApplicationResponse::Json(
|
||||||
user_api::ConnectAccountResponse {
|
user_api::ConnectAccountResponse {
|
||||||
is_email_sent: magic_link_result.is_ok(),
|
is_email_sent: magic_link_result.is_ok(),
|
||||||
user_id: user_from_db.get_user_id().to_string(),
|
user_id: user_from_db.get_user_id().to_string(),
|
||||||
},
|
},
|
||||||
));
|
))
|
||||||
} else {
|
} else {
|
||||||
Err(find_user
|
Err(find_user
|
||||||
.err()
|
.err()
|
||||||
|
|||||||
Reference in New Issue
Block a user