Skip to content

Conversation

@sudharsangs
Copy link
Contributor

Type of Change

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

Description

Instead of relying on a default match case _ I have added conditions for each type in match statements.

Changes are made at https://github.com/juspay/hyperswitch/blob/main/crates/router/src/connector/worldpay/transformers.rs

Motivation and Context

Closes #2290

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
  • I added a CHANGELOG entry if applicable

@sudharsangs sudharsangs requested a review from a team as a code owner October 7, 2023 11:57
@sudharsangs sudharsangs closed this Oct 7, 2023
@sudharsangs sudharsangs reopened this Oct 7, 2023
@sudharsangs sudharsangs requested review from a team, ashokkjag and jarnura as code owners October 7, 2023 13:46
@prasunna09 prasunna09 added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed hacktoberfest Issues that are up for grabs for Hacktoberfest participants C-refactor Category: Refactor and removed C-feature Category: Feature request or enhancement labels Oct 10, 2023
})
}
_ => Err(errors::ConnectorError::FailedToObtainAuthType)?,
types::ConnectorAuthType::CurrencyAuthKey { auth_key_map: _ } => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sudharsangs,
Can you please revert back this change as wildcard match arms (_) is not in scope for AuthType?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the change @prasunna09

@prasunna09 prasunna09 added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Oct 10, 2023
prasunna09
prasunna09 previously approved these changes Oct 18, 2023
SanchithHegde
SanchithHegde previously approved these changes Oct 18, 2023
Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Thanks for the PR, @sudharsangs!

@prasunna09
Copy link
Contributor

@sudharsangs Can you please revert back the Cargo.lock file?

@prasunna09 prasunna09 added S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels Oct 18, 2023
@swangi-kumari
Copy link
Contributor

Hey @sudharsangs ,
Please revert back the cargo.lock file.
Run git checkout main -- Cargo.lock command and push your code.

@sudharsangs sudharsangs dismissed stale reviews from SanchithHegde and prasunna09 via 63cfce8 October 23, 2023 12:04
@sudharsangs sudharsangs requested a review from a team as a code owner October 23, 2023 12:04
@sudharsangs
Copy link
Contributor Author

Hey @sudharsangs , Please revert back the cargo.lock file. Run git checkout main -- Cargo.lock command and push your code.

I did a git checkout upstream/main -- Cargo.lock but it's not changing I am not sure why

@SanchithHegde SanchithHegde added this pull request to the merge queue Oct 25, 2023
@SanchithHegde SanchithHegde added hacktoberfest-accepted Pull requests accepted as Hacktoberfest contributions and removed S-waiting-on-approval Status: Review completed, awaiting for approvals from code-owners labels Oct 25, 2023
Merged via the queue into juspay:main with commit 2b2c381 Oct 25, 2023
@VedantKhairnar
Copy link
Contributor

Hey @sudharsangs ,
Thanks a bunch for all your contributions! We've got a little something for you to show our appreciation.
Just take a moment to fill out this form, and get ready for some awesome swag coming your way.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-integration Area: Connector integration C-refactor Category: Refactor hacktoberfest Issues that are up for grabs for Hacktoberfest participants hacktoberfest-accepted Pull requests accepted as Hacktoberfest contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR]: [Worldpay] Remove Default Case Handling

8 participants