Clippy: fix for newrelic, lint duplicate field name

This commit is contained in:
Brandon Thomas committed 2023-08-20 21:56:20 -04:00
1 parent 3b40f005d0
commit a63b085086
11 files changed
+20 -15

No files matched your search

+3
View File
@@ -68,4 +68,7 @@ members = [
"crates/service/plugins/billing",
"crates/service/plugins/inference_workloads",
"crates/service/plugins/users",
# Vendored code
"crates/vendor/newrelic-telemetry-sdk-rust",
]
@@ -23,9 +23,9 @@ pub fn charge_succeeded_handler(charge: &Charge) -> Result<StripeWebhookSummary,
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(charge_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
@@ -25,9 +25,9 @@ pub fn checkout_session_completed_handler(checkout_session: CheckoutSession) ->
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(stripe_checkout_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
@@ -17,7 +17,7 @@ pub fn customer_created_handler(customer: &Customer) -> Result<StripeWebhookSumm
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(customer_id.clone()),
maybe_stripe_customer_id: Some(customer_id.clone()),
action_was_taken: false,
@@ -16,7 +16,7 @@ pub fn customer_deleted_handler(customer: &Customer) -> Result<StripeWebhookSumm
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(customer_id.clone()),
maybe_stripe_customer_id: Some(customer_id.clone()),
action_was_taken: false,
@@ -16,7 +16,7 @@ pub fn customer_updated_handler(customer: &Customer) -> Result<StripeWebhookSumm
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(customer_id.clone()),
maybe_stripe_customer_id: Some(customer_id.clone()),
action_was_taken: false,
@@ -23,9 +23,9 @@ pub fn invoice_payment_failed_handler(invoice: &Invoice) -> Result<StripeWebhook
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(invoice_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
@@ -23,9 +23,9 @@ pub fn invoice_payment_succeeded_handler(invoice: &Invoice) -> Result<StripeWebh
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(invoice_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
@@ -28,9 +28,9 @@ pub fn invoice_updated_handler(invoice: &Invoice) -> Result<StripeWebhookSummary
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(invoice_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
@@ -23,9 +23,9 @@ pub fn payment_intent_succeeded_handler(payment_intent: &PaymentIntent) -> Resul
.map(|t| t.to_string());
Ok(StripeWebhookSummary {
maybe_user_token: maybe_user_token,
maybe_user_token,
maybe_event_entity_id: Some(payment_intent_id),
maybe_stripe_customer_id: maybe_stripe_customer_id,
maybe_stripe_customer_id,
action_was_taken: false,
should_ignore_retry: false,
})
+2
View File
@@ -8,7 +8,9 @@ echo 'Running lints...'
# TODO: 'sqlite_queries' and 'aichatbot-sidecar' are broken due to sqlite
# newrelic excluded since we don't author it
# --no-deps prevents running on path dependencies within workspaces
cargo cranky \
--no-deps \
--workspace \
--exclude aichatbot-sidecar \
--exclude fakeyou_client \