mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
chore: enable clippy::trivially_copy_pass_by_ref lint and address it (#6724)
This commit is contained in:
@ -118,7 +118,7 @@ pub async fn get_api_event_metrics(
|
||||
&req.group_by_names.clone(),
|
||||
&merchant_id_scoped,
|
||||
&req.filters,
|
||||
&req.time_series.map(|t| t.granularity),
|
||||
req.time_series.map(|t| t.granularity),
|
||||
&req.time_range,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -45,7 +45,7 @@ where
|
||||
dimensions: &[ApiEventDimensions],
|
||||
merchant_id: &common_utils::id_type::MerchantId,
|
||||
filters: &ApiEventFilters,
|
||||
granularity: &Option<Granularity>,
|
||||
granularity: Option<Granularity>,
|
||||
time_range: &TimeRange,
|
||||
pool: &T,
|
||||
) -> MetricsResult<HashSet<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>>;
|
||||
@ -66,7 +66,7 @@ where
|
||||
dimensions: &[ApiEventDimensions],
|
||||
merchant_id: &common_utils::id_type::MerchantId,
|
||||
filters: &ApiEventFilters,
|
||||
granularity: &Option<Granularity>,
|
||||
granularity: Option<Granularity>,
|
||||
time_range: &TimeRange,
|
||||
pool: &T,
|
||||
) -> MetricsResult<HashSet<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>> {
|
||||
|
||||
@ -32,7 +32,7 @@ where
|
||||
_dimensions: &[ApiEventDimensions],
|
||||
merchant_id: &common_utils::id_type::MerchantId,
|
||||
filters: &ApiEventFilters,
|
||||
granularity: &Option<Granularity>,
|
||||
granularity: Option<Granularity>,
|
||||
time_range: &TimeRange,
|
||||
pool: &T,
|
||||
) -> MetricsResult<HashSet<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>> {
|
||||
@ -62,7 +62,7 @@ where
|
||||
alias: Some("end_bucket"),
|
||||
})
|
||||
.switch()?;
|
||||
if let Some(granularity) = granularity.as_ref() {
|
||||
if let Some(granularity) = granularity {
|
||||
granularity
|
||||
.set_group_by_clause(&mut query_builder)
|
||||
.attach_printable("Error adding granularity")
|
||||
|
||||
@ -35,7 +35,7 @@ where
|
||||
_dimensions: &[ApiEventDimensions],
|
||||
merchant_id: &common_utils::id_type::MerchantId,
|
||||
filters: &ApiEventFilters,
|
||||
granularity: &Option<Granularity>,
|
||||
granularity: Option<Granularity>,
|
||||
time_range: &TimeRange,
|
||||
pool: &T,
|
||||
) -> MetricsResult<HashSet<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>> {
|
||||
@ -67,7 +67,7 @@ where
|
||||
alias: Some("end_bucket"),
|
||||
})
|
||||
.switch()?;
|
||||
if let Some(granularity) = granularity.as_ref() {
|
||||
if let Some(granularity) = granularity {
|
||||
granularity
|
||||
.set_group_by_clause(&mut query_builder)
|
||||
.attach_printable("Error adding granularity")
|
||||
|
||||
@ -32,7 +32,7 @@ where
|
||||
_dimensions: &[ApiEventDimensions],
|
||||
merchant_id: &common_utils::id_type::MerchantId,
|
||||
filters: &ApiEventFilters,
|
||||
granularity: &Option<Granularity>,
|
||||
granularity: Option<Granularity>,
|
||||
time_range: &TimeRange,
|
||||
pool: &T,
|
||||
) -> MetricsResult<HashSet<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>> {
|
||||
@ -68,7 +68,7 @@ where
|
||||
alias: Some("end_bucket"),
|
||||
})
|
||||
.switch()?;
|
||||
if let Some(granularity) = granularity.as_ref() {
|
||||
if let Some(granularity) = granularity {
|
||||
granularity
|
||||
.set_group_by_clause(&mut query_builder)
|
||||
.attach_printable("Error adding granularity")
|
||||
|
||||
Reference in New Issue
Block a user