chore: address Rust 1.66 clippy lints (#162)

This commit is contained in:
Sanchith Hegde
2022-12-16 12:21:31 +05:30
committed by GitHub
parent aaa1901c5d
commit 8f43489989
4 changed files with 5 additions and 5 deletions

View File

@ -617,7 +617,7 @@ impl api::IncomingWebhook for Adyen {
let response: adyen::AdyenResponse = notif.into(); let response: adyen::AdyenResponse = notif.into();
let res_json = serde_json::to_value(&response) let res_json = serde_json::to_value(response)
.into_report() .into_report()
.change_context(errors::ConnectorError::WebhookResourceObjectNotFound)?; .change_context(errors::ConnectorError::WebhookResourceObjectNotFound)?;

View File

@ -861,7 +861,7 @@ impl api::IncomingWebhook for Stripe {
.ok_or(errors::ConnectorError::WebhookSignatureNotFound) .ok_or(errors::ConnectorError::WebhookSignatureNotFound)
.into_report()?; .into_report()?;
hex::decode(&signature) hex::decode(signature)
.into_report() .into_report()
.change_context(errors::ConnectorError::WebhookSignatureNotFound) .change_context(errors::ConnectorError::WebhookSignatureNotFound)
} }

View File

@ -26,8 +26,8 @@ pub struct ConnectorPTMapping {
pub max_retries_count: i32, pub max_retries_count: i32,
} }
impl ConnectorPTMapping { impl Default for ConnectorPTMapping {
pub fn default() -> Self { fn default() -> Self {
Self { Self {
custom_merchant_mapping: HashMap::new(), custom_merchant_mapping: HashMap::new(),
default_mapping: RetryMapping { default_mapping: RetryMapping {

View File

@ -160,7 +160,7 @@ pub async fn get_batches(
})?; })?;
metrics::BATCHES_CONSUMED.add(&metrics::CONTEXT, 1, &[]); metrics::BATCHES_CONSUMED.add(&metrics::CONTEXT, 1, &[]);
let (batches, entry_ids): (Vec<Vec<ProcessTrackerBatch>>, Vec<Vec<String>>) = response.into_iter().map(|(_key, entries)| { let (batches, entry_ids): (Vec<Vec<ProcessTrackerBatch>>, Vec<Vec<String>>) = response.into_values().map(|entries| {
entries.into_iter().try_fold( entries.into_iter().try_fold(
(Vec::new(), Vec::new()), (Vec::new(), Vec::new()),
|(mut batches, mut entry_ids), entry| { |(mut batches, mut entry_ids), entry| {