Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: address Rust 1.84.0 clippy lints #7021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Chethan-rao
Copy link
Contributor

@Chethan-rao Chethan-rao commented Jan 10, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR addresses the clippy lints occurring due to new rust version 1.84.0
Majorly addresses unnecessary_map_or clippy lint - https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

CI checks should pass as this PR addresses clippy lints.

  1. ran just clippy with new rust version (1.84.0)

image

  1. ran just clippy_v2 with new rust version (1.84.0)

image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@Chethan-rao Chethan-rao added the C-refactor Category: Refactor label Jan 10, 2025
@Chethan-rao Chethan-rao self-assigned this Jan 10, 2025
@Chethan-rao Chethan-rao requested review from a team as code owners January 10, 2025 09:59
Copy link

semanticdiff-com bot commented Jan 10, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/connector/authorizedotnet/transformers.rs  99% smaller
  crates/diesel_models/src/query/address.rs  96% smaller
  crates/router/src/connector/cybersource/transformers.rs  92% smaller
  crates/router/src/db/dashboard_metadata.rs  87% smaller
  crates/router/src/connector/utils.rs  78% smaller
  crates/hyperswitch_connectors/src/utils.rs  76% smaller
  crates/router/src/connector/bankofamerica/transformers.rs  69% smaller
  crates/router/src/connector/wellsfargo/transformers.rs  68% smaller
  crates/router/src/core/admin.rs  60% smaller
  crates/euclid/src/backend/vir_interpreter/types.rs  59% smaller
  crates/router/src/core/utils.rs  31% smaller
  crates/router/src/core/relay/utils.rs  30% smaller
  crates/router/src/core/payment_methods/cards.rs  28% smaller
  crates/router/src/core/refunds.rs  25% smaller
  crates/router/src/core/fraud_check.rs  25% smaller
  crates/router/src/core/payouts/helpers.rs  18% smaller
  crates/router/src/services/pm_auth.rs  17% smaller
  crates/router/src/services/authentication/blacklist.rs  17% smaller
  crates/router/src/core/fraud_check/flows/sale_flow.rs  16% smaller
  crates/router/src/core/fraud_check/flows/checkout_flow.rs  15% smaller
  crates/router/src/core/fraud_check/flows/transaction_flow.rs  15% smaller
  crates/router/src/core/fraud_check/flows/record_return.rs  15% smaller
  crates/storage_impl/src/redis/kv_store.rs  13% smaller
  crates/router/src/db/refund.rs  12% smaller
  crates/euclid/src/dssa/graph.rs  12% smaller
  crates/router/src/core/payments/operations/payment_create.rs  12% smaller
  crates/router/src/utils/user/dashboard_metadata.rs  12% smaller
  crates/router/src/connector/noon/transformers.rs  12% smaller
  Cargo.lock Unsupported file format
  crates/euclid_wasm/Cargo.toml Unsupported file format
  crates/router/src/core/blocklist/transformers.rs  0% smaller
  crates/router/src/core/customers.rs  0% smaller
  crates/router/src/core/payment_methods/utils.rs  0% smaller
  crates/router/src/core/payments/routing.rs  0% smaller
  crates/router/src/core/routing/helpers.rs  0% smaller
  crates/router/src/core/webhooks/utils.rs  0% smaller

@Chethan-rao Chethan-rao linked an issue Jan 10, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: address Rust 1.84.0 clippy lints
7 participants