-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, BITPAY, HELCIM, PAYBOX] Replaced lazystatic macros with LazyLock #7524
base: main
Are you sure you want to change the base?
Conversation
Changed Files
|
static BITPAY_SUPPORTED_WEBHOOK_FLOWS: LazyLock<Vec<enums::EventClass>> = | ||
LazyLock::new(|| vec![enums::EventClass::Payments]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AkshayaFoiger And this one can be an array instead possibly, depending on how it's being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be an array, but this refactoring needs to be done for all the connectors that implements ConnectorSpecifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
…replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock fix(connector): [JPMORGAN, PAYU, DIGITALVIRGO, HELCIM, PAYBOX, PAYU] Replaced lazystatic macros with LazyLock
51ce499
to
8feab2f
Compare
PaymentMethodDetails { | ||
mandates: enums::FeatureStatus::NotSupported, | ||
refunds: enums::FeatureStatus::Supported, | ||
supported_capture_methods: supported_capture_methods.clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the clone()
? I don't see the supported_capture_methods
variable being read anywhere?
Please make this change in the other files modified in this PR as well, where there's only one usage of the variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
static BITPAY_SUPPORTED_WEBHOOK_FLOWS: LazyLock<[enums::EventClass; 1]> = | ||
LazyLock::new(|| [enums::EventClass::Payments]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static BITPAY_SUPPORTED_WEBHOOK_FLOWS: LazyLock<[enums::EventClass; 1]> = | |
LazyLock::new(|| [enums::EventClass::Payments]); | |
static BITPAY_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 1] = [enums::EventClass::Payments]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
…] Replaced lazystatic macros with LazyLock
Type of Change
Description
Replaced lazystatic macros with LazyLock
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy