chore: address Rust 1.90.0 clippy lints (#9511)

This commit is contained in:
Gaurav Rawat
2025-09-26 00:06:42 +05:30
committed by GitHub
parent 239b6d37c6
commit 198fe07891
16 changed files with 19 additions and 106 deletions

View File

@ -22,7 +22,7 @@ pub trait FraudCheckOperation<F, D>: Send + std::fmt::Debug {
Err(report!(errors::ApiErrorResponse::InternalServerError))
.attach_printable_lazy(|| format!("get tracker interface not found for {self:?}"))
}
fn to_domain(&self) -> RouterResult<&(dyn Domain<F, D>)> {
fn to_domain(&self) -> RouterResult<&dyn Domain<F, D>> {
Err(report!(errors::ApiErrorResponse::InternalServerError))
.attach_printable_lazy(|| format!("domain interface not found for {self:?}"))
}

View File

@ -54,7 +54,7 @@ where
fn to_get_tracker(&self) -> RouterResult<&(dyn GetTracker<PaymentToFrmData> + Send + Sync)> {
Ok(*self)
}
fn to_domain(&self) -> RouterResult<&(dyn Domain<F, D>)> {
fn to_domain(&self) -> RouterResult<&dyn Domain<F, D>> {
Ok(*self)
}
fn to_update_tracker(&self) -> RouterResult<&(dyn UpdateTracker<FrmData, F, D> + Send + Sync)> {
@ -74,7 +74,7 @@ where
fn to_get_tracker(&self) -> RouterResult<&(dyn GetTracker<PaymentToFrmData> + Send + Sync)> {
Ok(self)
}
fn to_domain(&self) -> RouterResult<&(dyn Domain<F, D>)> {
fn to_domain(&self) -> RouterResult<&dyn Domain<F, D>> {
Ok(self)
}
fn to_update_tracker(&self) -> RouterResult<&(dyn UpdateTracker<FrmData, F, D> + Send + Sync)> {

View File

@ -45,7 +45,7 @@ where
fn to_get_tracker(&self) -> RouterResult<&(dyn GetTracker<PaymentToFrmData> + Send + Sync)> {
Ok(*self)
}
fn to_domain(&self) -> RouterResult<&(dyn Domain<F, D>)> {
fn to_domain(&self) -> RouterResult<&dyn Domain<F, D>> {
Ok(*self)
}
fn to_update_tracker(&self) -> RouterResult<&(dyn UpdateTracker<FrmData, F, D> + Send + Sync)> {
@ -61,7 +61,7 @@ where
fn to_get_tracker(&self) -> RouterResult<&(dyn GetTracker<PaymentToFrmData> + Send + Sync)> {
Ok(self)
}
fn to_domain(&self) -> RouterResult<&(dyn Domain<F, D>)> {
fn to_domain(&self) -> RouterResult<&dyn Domain<F, D>> {
Ok(self)
}
fn to_update_tracker(&self) -> RouterResult<&(dyn UpdateTracker<FrmData, F, D> + Send + Sync)> {

View File

@ -153,7 +153,7 @@ pub trait StorageInterface:
{
fn get_scheduler_db(&self) -> Box<dyn scheduler::SchedulerInterface>;
fn get_payment_methods_store(&self) -> Box<dyn PaymentMethodsStorageInterface>;
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)>;
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static>;
}
#[async_trait::async_trait]
@ -168,7 +168,7 @@ pub trait GlobalStorageInterface:
+ RedisConnInterface
+ 'static
{
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)>;
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static>;
}
#[async_trait::async_trait]
@ -226,14 +226,14 @@ impl StorageInterface for Store {
Box::new(self.clone())
}
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}
#[async_trait::async_trait]
impl GlobalStorageInterface for Store {
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}
@ -249,14 +249,14 @@ impl StorageInterface for MockDb {
Box::new(self.clone())
}
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}
#[async_trait::async_trait]
impl GlobalStorageInterface for MockDb {
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}

View File

@ -3316,13 +3316,13 @@ impl StorageInterface for KafkaStore {
Box::new(self.clone())
}
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}
impl GlobalStorageInterface for KafkaStore {
fn get_cache_store(&self) -> Box<(dyn RedisConnInterface + Send + Sync + 'static)> {
fn get_cache_store(&self) -> Box<dyn RedisConnInterface + Send + Sync + 'static> {
Box::new(self.clone())
}
}

View File

@ -233,7 +233,7 @@ impl SessionStateInfo for SessionState {
fn session_state(&self) -> SessionState {
self.clone()
}
fn global_store(&self) -> Box<(dyn GlobalStorageInterface)> {
fn global_store(&self) -> Box<dyn GlobalStorageInterface> {
self.global_store.to_owned()
}
}

View File

@ -24,10 +24,7 @@ pub trait RequestBuilder: Send + Sync {
fn send(
self,
) -> CustomResult<
Box<
(dyn core::future::Future<Output = Result<reqwest::Response, reqwest::Error>>
+ 'static),
>,
Box<dyn core::future::Future<Output = Result<reqwest::Response, reqwest::Error>> + 'static>,
ApiClientError,
>;
}
@ -154,10 +151,7 @@ impl RequestBuilder for RouterRequestBuilder {
fn send(
self,
) -> CustomResult<
Box<
(dyn core::future::Future<Output = Result<reqwest::Response, reqwest::Error>>
+ 'static),
>,
Box<dyn core::future::Future<Output = Result<reqwest::Response, reqwest::Error>> + 'static>,
ApiClientError,
> {
Ok(Box::new(