Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

chore: address Rust 1.91.0 clippy lints (#10162)

Sanchith Hegdea6d1a3aa0065
diff --git a/.clippy.toml b/.clippy.toml
index 4296655a04..b8043f976f 100644
--- a/.clippy.toml
+++ b/.clippy.toml
@@ -1 +1,5 @@
allow-dbg-in-tests = true
+allow-expect-in-tests = true
+allow-panic-in-tests = true
+allow-print-in-tests = true
+allow-unwrap-in-tests = true
diff --git a/Cargo.lock b/Cargo.lock
index 7c721e57f4..ce6a2876da 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,7 +14,7 @@ dependencies = [
"futures-sink",
"memchr",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tracing",
]
@@ -68,7 +68,7 @@ dependencies = [
"rand 0.9.1",
"sha1",
"smallvec 1.15.0",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tracing",
"zstd",
@@ -107,7 +107,7 @@ dependencies = [
"serde_json",
"serde_plain",
"tempfile",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -146,7 +146,7 @@ checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208"
dependencies = [
"actix-macros",
"futures-core",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -161,8 +161,8 @@ dependencies = [
"futures-core",
"futures-util",
"mio 1.0.3",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tracing",
]
@@ -191,7 +191,7 @@ dependencies = [
"impl-more",
"pin-project-lite",
"rustls-pki-types",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-rustls 0.23.4",
"tokio-rustls 0.25.0",
"tokio-util",
@@ -247,7 +247,7 @@ dependencies = [
"serde_json",
"serde_urlencoded",
"smallvec 1.15.0",
- "socket2",
+ "socket2 0.5.10",
"time",
"tracing",
"url",
@@ -265,15 +265,6 @@ dependencies = [
"syn 2.0.101",
]
-[[package]]
-name = "addr2line"
-version = "0.24.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
-dependencies = [
- "gimli",
-]
-
[[package]]
name = "adler"
version = "1.0.2"
@@ -382,7 +373,7 @@ dependencies = [
"strum 0.26.3",
"thiserror 1.0.69",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -628,7 +619,7 @@ dependencies = [
"diesel",
"futures 0.3.31",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -641,7 +632,7 @@ dependencies = [
"futures-core",
"memchr",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -740,7 +731,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -767,7 +758,7 @@ dependencies = [
"http 0.2.12",
"ring 0.17.14",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"url",
"zeroize",
@@ -1038,7 +1029,7 @@ checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c"
dependencies = [
"futures-util",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -1137,7 +1128,7 @@ dependencies = [
"rustls 0.23.27",
"rustls-native-certs 0.8.1",
"rustls-pki-types",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tower 0.5.2",
"tracing",
]
@@ -1199,7 +1190,7 @@ dependencies = [
"http-body 1.0.1",
"pin-project-lite",
"pin-utils",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
]
@@ -1215,7 +1206,7 @@ dependencies = [
"http 0.2.12",
"http 1.3.1",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"zeroize",
]
@@ -1242,7 +1233,7 @@ dependencies = [
"ryu",
"serde",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
]
@@ -1323,7 +1314,7 @@ dependencies = [
"serde_path_to_error",
"serde_urlencoded",
"sync_wrapper 1.0.1",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tower 0.5.2",
"tower-layer",
"tower-service",
@@ -1370,21 +1361,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "backtrace"
-version = "0.3.74"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
-dependencies = [
- "addr2line",
- "cfg-if 1.0.0",
- "libc",
- "miniz_oxide 0.8.7",
- "object",
- "rustc-demangle",
- "windows-targets 0.52.6",
-]
-
[[package]]
name = "base16ct"
version = "0.1.1"
@@ -1467,7 +1443,7 @@ dependencies = [
"async-trait",
"futures-util",
"parking_lot 0.12.3",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -2097,7 +2073,7 @@ dependencies = [
"test-case",
"thiserror 1.0.69",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"url",
"urlencoding",
"utoipa",
@@ -2638,7 +2614,7 @@ dependencies = [
"async-trait",
"deadpool-runtime",
"num_cpus",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -2936,7 +2912,7 @@ dependencies = [
"serde_json",
"serde_path_to_error",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -3289,7 +3265,7 @@ dependencies = [
"superposition_provider",
"thiserror 1.0.69",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tonic 0.13.1",
"tonic-build",
"tonic-reflection",
@@ -3326,7 +3302,7 @@ dependencies = [
"serde",
"serde_json",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"url",
"webdriver",
]
@@ -3474,8 +3450,8 @@ dependencies = [
"rand 0.8.5",
"redis-protocol",
"semver 1.0.26",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tokio-stream",
"tokio-util",
"tracing",
@@ -3701,12 +3677,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "gimli"
-version = "0.31.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
-
[[package]]
name = "git2"
version = "0.19.0"
@@ -3844,7 +3814,7 @@ dependencies = [
"http 0.2.12",
"indexmap 2.9.0",
"slab",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tracing",
]
@@ -3863,7 +3833,7 @@ dependencies = [
"http 1.3.1",
"indexmap 2.9.0",
"slab",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tracing",
]
@@ -4152,8 +4122,8 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tower-service",
"tracing",
"want",
@@ -4176,7 +4146,7 @@ dependencies = [
"itoa",
"pin-project-lite",
"smallvec 1.15.0",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"want",
]
@@ -4193,7 +4163,7 @@ dependencies = [
"hyper 0.14.32",
"hyper-tls 0.5.0",
"native-tls",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-native-tls",
"tower-service",
]
@@ -4209,7 +4179,7 @@ dependencies = [
"log",
"rustls 0.20.9",
"rustls-native-certs 0.6.3",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-rustls 0.23.4",
]
@@ -4225,7 +4195,7 @@ dependencies = [
"log",
"rustls 0.21.12",
"rustls-native-certs 0.6.3",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-rustls 0.24.1",
]
@@ -4241,7 +4211,7 @@ dependencies = [
"rustls 0.23.27",
"rustls-native-certs 0.8.1",
"rustls-pki-types",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-rustls 0.26.2",
"tower-service",
"webpki-roots 1.0.0",
@@ -4256,7 +4226,7 @@ dependencies = [
"hyper 1.6.0",
"hyper-util",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tower-service",
]
@@ -4269,7 +4239,7 @@ dependencies = [
"bytes 1.10.1",
"hyper 0.14.32",
"native-tls",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-native-tls",
]
@@ -4284,7 +4254,7 @@ dependencies = [
"hyper 1.6.0",
"hyper-util",
"native-tls",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-native-tls",
"tower-service",
]
@@ -4303,8 +4273,8 @@ dependencies = [
"hyper 1.6.0",
"libc",
"pin-project-lite",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tower-service",
"tracing",
]
@@ -4695,7 +4665,7 @@ dependencies = [
"serde",
"serde_json",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"url",
]
@@ -4963,8 +4933,8 @@ dependencies = [
"nom 8.0.0",
"percent-encoding",
"quoted_printable",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"url",
]
@@ -5708,15 +5678,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "object"
-version = "0.36.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "oid-registry"
version = "0.7.1"
@@ -5755,7 +5716,7 @@ dependencies = [
"log",
"mockall",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"typed-builder 0.22.0",
]
@@ -5912,7 +5873,7 @@ dependencies = [
"opentelemetry_sdk",
"prost",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tonic 0.12.3",
]
@@ -5943,7 +5904,7 @@ dependencies = [
"percent-encoding",
"rand 0.8.5",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-stream",
]
@@ -6741,9 +6702,9 @@ dependencies = [
"quinn-udp",
"rustc-hash 2.1.1",
"rustls 0.23.27",
- "socket2",
+ "socket2 0.5.10",
"thiserror 2.0.12",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"web-time",
]
@@ -6778,7 +6739,7 @@ dependencies = [
"cfg_aliases",
"libc",
"once_cell",
- "socket2",
+ "socket2 0.5.10",
"tracing",
"windows-sys 0.59.0",
]
@@ -6942,7 +6903,7 @@ dependencies = [
"serde_derive",
"serde_json",
"slab",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -6981,7 +6942,7 @@ dependencies = [
"futures 0.3.31",
"serde",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-stream",
"tracing",
]
@@ -7106,7 +7067,7 @@ dependencies = [
"serde_urlencoded",
"sync_wrapper 0.1.2",
"system-configuration 0.5.1",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-native-tls",
"tokio-rustls 0.24.1",
"tokio-util",
@@ -7156,7 +7117,7 @@ dependencies = [
"serde_urlencoded",
"sync_wrapper 1.0.1",
"system-configuration 0.6.1",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-native-tls",
"tokio-rustls 0.26.2",
"tokio-util",
@@ -7367,7 +7328,7 @@ dependencies = [
"test_utils",
"thiserror 1.0.69",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"totp-rs",
"tracing-futures",
"ucs_cards",
@@ -7417,7 +7378,7 @@ dependencies = [
"serde_path_to_error",
"strum 0.26.3",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"tracing-actix-web",
"tracing-appender",
@@ -7539,12 +7500,6 @@ dependencies = [
"serde_json",
]
-[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
-
[[package]]
name = "rustc-hash"
version = "1.1.0"
@@ -7859,7 +7814,7 @@ dependencies = [
"strum 0.26.3",
"thiserror 1.0.69",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"uuid",
]
@@ -7922,9 +7877,9 @@ dependencies = [
"scylla-macros",
"smallvec 1.15.0",
"snap",
- "socket2",
+ "socket2 0.5.10",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tracing",
"uuid",
]
@@ -7942,7 +7897,7 @@ dependencies = [
"snap",
"stable_deref_trait",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"uuid",
"yoke",
]
@@ -8331,7 +8286,7 @@ dependencies = [
"futures-core",
"libc",
"signal-hook",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -8497,6 +8452,16 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "socket2"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
+dependencies = [
+ "libc",
+ "windows-sys 0.60.2",
+]
+
[[package]]
name = "spin"
version = "0.5.2"
@@ -8576,7 +8541,7 @@ dependencies = [
"smallvec 1.15.0",
"thiserror 2.0.12",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-stream",
"tracing",
"url",
@@ -8616,7 +8581,7 @@ dependencies = [
"sqlx-postgres",
"sqlx-sqlite",
"syn 2.0.101",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"url",
]
@@ -8781,7 +8746,7 @@ dependencies = [
"serde",
"serde_json",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -8936,7 +8901,7 @@ dependencies = [
"strum_macros 0.25.3",
"superposition_types",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"uniffi",
]
@@ -8969,7 +8934,7 @@ dependencies = [
"superposition_sdk",
"superposition_types",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"uuid",
]
@@ -9320,7 +9285,7 @@ dependencies = [
"serial_test",
"thirtyfour",
"time",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"toml 0.8.22",
]
@@ -9354,7 +9319,7 @@ dependencies = [
"stringmatch",
"thirtyfour-macros",
"thiserror 1.0.69",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"url",
"urlparse",
]
@@ -9523,20 +9488,19 @@ dependencies = [
[[package]]
name = "tokio"
-version = "1.45.1"
+version = "1.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
+checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
dependencies = [
- "backtrace",
"bytes 1.10.1",
"libc",
"mio 1.0.3",
"parking_lot 0.12.3",
"pin-project-lite",
"signal-hook-registry",
- "socket2",
+ "socket2 0.6.1",
"tokio-macros",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -9594,9 +9558,9 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
+checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
dependencies = [
"proc-macro2",
"quote",
@@ -9610,7 +9574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -9639,7 +9603,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
"rustls 0.20.9",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"webpki",
]
@@ -9650,7 +9614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
"rustls 0.21.12",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -9661,7 +9625,7 @@ checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
dependencies = [
"rustls 0.22.4",
"rustls-pki-types",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -9671,7 +9635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
dependencies = [
"rustls 0.23.27",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -9682,7 +9646,7 @@ checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
]
@@ -9782,7 +9746,7 @@ dependencies = [
"futures-core",
"futures-sink",
"pin-project-lite",
- "tokio 1.45.1",
+ "tokio 1.48.0",
]
[[package]]
@@ -9882,8 +9846,8 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tokio-stream",
"tower 0.4.13",
"tower-layer",
@@ -9911,8 +9875,8 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
- "socket2",
- "tokio 1.45.1",
+ "socket2 0.5.10",
+ "tokio 1.48.0",
"tokio-stream",
"tower 0.5.2",
"tower-layer",
@@ -9942,7 +9906,7 @@ checksum = "f9687bd5bfeafebdded2356950f278bba8226f0b32109537c4253406e09aafe1"
dependencies = [
"prost",
"prost-types",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-stream",
"tonic 0.13.1",
]
@@ -9987,7 +9951,7 @@ dependencies = [
"pin-project-lite",
"rand 0.8.5",
"slab",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tower-layer",
"tower-service",
@@ -10006,7 +9970,7 @@ dependencies = [
"pin-project-lite",
"slab",
"sync_wrapper 1.0.1",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"tokio-util",
"tower-layer",
"tower-service",
@@ -11051,6 +11015,12 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
[[package]]
name = "windows-registry"
version = "0.2.0"
@@ -11108,6 +11078,24 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-sys"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
+dependencies = [
+ "windows-targets 0.53.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
[[package]]
name = "windows-targets"
version = "0.48.5"
@@ -11132,13 +11120,30 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
- "windows_i686_gnullvm",
+ "windows_i686_gnullvm 0.52.6",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
+[[package]]
+name = "windows-targets"
+version = "0.53.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
+dependencies = [
+ "windows-link",
+ "windows_aarch64_gnullvm 0.53.1",
+ "windows_aarch64_msvc 0.53.1",
+ "windows_i686_gnu 0.53.1",
+ "windows_i686_gnullvm 0.53.1",
+ "windows_i686_msvc 0.53.1",
+ "windows_x86_64_gnu 0.53.1",
+ "windows_x86_64_gnullvm 0.53.1",
+ "windows_x86_64_msvc 0.53.1",
+]
+
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
@@ -11151,6 +11156,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
+
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
@@ -11163,6 +11174,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
+
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
@@ -11175,12 +11192,24 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+[[package]]
+name = "windows_i686_gnu"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
+
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
+
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
@@ -11193,6 +11222,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+[[package]]
+name = "windows_i686_msvc"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
+
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
@@ -11205,6 +11240,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
+
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
@@ -11217,6 +11258,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
+
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
@@ -11229,6 +11276,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.53.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
+
[[package]]
name = "winnow"
version = "0.5.40"
@@ -11277,7 +11330,7 @@ dependencies = [
"regex",
"serde",
"serde_json",
- "tokio 1.45.1",
+ "tokio 1.48.0",
"url",
]
diff --git a/crates/analytics/Cargo.toml b/crates/analytics/Cargo.toml
index fcf7830b95..6a35cd22af 100644
--- a/crates/analytics/Cargo.toml
+++ b/crates/analytics/Cargo.toml
@@ -40,7 +40,7 @@ sqlx = { version = "0.8.6", features = ["postgres", "runtime-tokio", "runtime-to
strum = { version = "0.26.3", features = ["derive"] }
thiserror = "1.0.69"
time = { version = "0.3.41", features = ["serde", "serde-well-known", "std"] }
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
[lints]
workspace = true
diff --git a/crates/api_models/src/api_keys.rs b/crates/api_models/src/api_keys.rs
index 3c4d566f23..dad6495aec 100644
--- a/crates/api_models/src/api_keys.rs
+++ b/crates/api_models/src/api_keys.rs
@@ -259,7 +259,6 @@ impl<'a> ToSchema<'a> for ApiKeyExpiration {
#[cfg(test)]
mod api_key_expiration_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
#[test]
diff --git a/crates/api_models/src/ephemeral_key.rs b/crates/api_models/src/ephemeral_key.rs
index 9f569b91f7..eb8eb9c317 100644
--- a/crates/api_models/src/ephemeral_key.rs
+++ b/crates/api_models/src/ephemeral_key.rs
@@ -1,7 +1,6 @@
use common_utils::id_type;
#[cfg(feature = "v2")]
use masking::Secret;
-use serde;
use utoipa::ToSchema;
#[cfg(feature = "v1")]
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index d2d6908dc1..0680ce2406 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -9143,7 +9143,6 @@ pub mod amount {
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
use super::*;
#[test]
@@ -9461,8 +9460,6 @@ pub struct PaymentsEligibilityResponse {
#[cfg(feature = "v1")]
#[cfg(test)]
mod payments_request_api_contract {
- #![allow(clippy::unwrap_used)]
- #![allow(clippy::panic)]
use std::str::FromStr;
use super::*;
@@ -9564,7 +9561,6 @@ mod payments_request_api_contract {
#[cfg(test)]
mod payments_response_api_contract {
- #![allow(clippy::unwrap_used)]
use super::*;
#[derive(Debug, serde::Serialize)]
@@ -9595,7 +9591,6 @@ mod payments_response_api_contract {
/// These are required for backwards compatibility
#[cfg(test)]
mod billing_from_payment_method_data {
- #![allow(clippy::unwrap_used)]
use common_enums::CountryAlpha2;
use masking::ExposeOptionInterface;
@@ -10090,7 +10085,6 @@ mod null_object_test {
use super::*;
- #[allow(clippy::unwrap_used)]
#[test]
fn test_null_object_serialization() {
let null_object = NullObject;
diff --git a/crates/api_models/src/tokenization.rs b/crates/api_models/src/tokenization.rs
index 914a8110a6..7bd0e91c3e 100644
--- a/crates/api_models/src/tokenization.rs
+++ b/crates/api_models/src/tokenization.rs
@@ -1,4 +1,3 @@
-use common_enums;
use common_utils::id_type;
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
diff --git a/crates/cards/src/validate.rs b/crates/cards/src/validate.rs
index 998097c855..b9fc248413 100644
--- a/crates/cards/src/validate.rs
+++ b/crates/cards/src/validate.rs
@@ -197,7 +197,7 @@ pub fn sanitize_card_number(card_number: &str) -> Result<bool, CardNumberValidat
/// # Panics
///
-/// Never, as a single character will never be greater than 10, or `u8`
+/// Never, as a single decimal digit will never be greater than 10, or `u8`
pub fn validate_card_number_chars(number: &str) -> Result<Vec<u8>, CardNumberValidationErr> {
let data = number.chars().try_fold(
Vec::with_capacity(MAX_CARD_NUMBER_LENGTH),
@@ -210,7 +210,7 @@ pub fn validate_card_number_chars(number: &str) -> Result<Vec<u8>, CardNumberVal
"invalid character found in card number",
))?
.try_into()
- .expect("error while converting a single character to u8"), // safety, a single character will never be greater `u8`
+ .expect("error while converting a single decimal digit to u8"), // safety, a single decimal digit will never be greater `u8`
);
Ok::<Vec<u8>, CardNumberValidationErr>(data)
},
@@ -313,8 +313,6 @@ where
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
-
use masking::Secret;
use super::*;
diff --git a/crates/common_enums/src/enums/accounts.rs b/crates/common_enums/src/enums/accounts.rs
index 844ef39824..bb0c5845c4 100644
--- a/crates/common_enums/src/enums/accounts.rs
+++ b/crates/common_enums/src/enums/accounts.rs
@@ -1,4 +1,3 @@
-use serde;
use utoipa::ToSchema;
#[derive(
Copy,
diff --git a/crates/common_enums/src/enums/payments.rs b/crates/common_enums/src/enums/payments.rs
index 895303bab4..ee93d4bd57 100644
--- a/crates/common_enums/src/enums/payments.rs
+++ b/crates/common_enums/src/enums/payments.rs
@@ -1,4 +1,3 @@
-use serde;
use utoipa::ToSchema;
#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
diff --git a/crates/common_enums/src/transformers.rs b/crates/common_enums/src/transformers.rs
index 83cdfd9947..024050f858 100644
--- a/crates/common_enums/src/transformers.rs
+++ b/crates/common_enums/src/transformers.rs
@@ -2226,8 +2226,6 @@ impl From<SubscriptionStatus> for Option<EventType> {
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
-
use super::*;
#[derive(serde::Serialize)]
diff --git a/crates/common_utils/Cargo.toml b/crates/common_utils/Cargo.toml
index ff5f73bd5f..e92b3470c8 100644
--- a/crates/common_utils/Cargo.toml
+++ b/crates/common_utils/Cargo.toml
@@ -58,7 +58,7 @@ signal-hook = { version = "0.3.18", optional = true }
strum = { version = "0.26.3", features = ["derive"] }
thiserror = "1.0.69"
time = { version = "0.3.41", features = ["serde", "serde-well-known", "std"] }
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"], optional = true }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"], optional = true }
url = { version = "2.5.4", features = ["serde"] }
urlencoding = "2.1.3"
utoipa = { version = "4.2.3", features = ["preserve_order", "preserve_path_order"] }
diff --git a/crates/common_utils/src/crypto.rs b/crates/common_utils/src/crypto.rs
index c76777eb05..9146384d26 100644
--- a/crates/common_utils/src/crypto.rs
+++ b/crates/common_utils/src/crypto.rs
@@ -4,8 +4,6 @@ use std::ops::Deref;
use base64::Engine;
use error_stack::ResultExt;
use masking::{ExposeInterface, Secret};
-use md5;
-use pem;
use ring::{
aead::{self, BoundKey, OpeningKey, SealingKey, UnboundKey},
hmac, rand as ring_rand,
@@ -769,7 +767,6 @@ impl SignMessage for RsaPssSha256 {
#[cfg(test)]
mod crypto_tests {
- #![allow(clippy::expect_used)]
use super::{DecodeMessage, EncodeMessage, SignMessage, VerifySignature};
use crate::crypto::GenerateDigest;
diff --git a/crates/common_utils/src/id_type.rs b/crates/common_utils/src/id_type.rs
index aec6e5d4f9..4d57975b0f 100644
--- a/crates/common_utils/src/id_type.rs
+++ b/crates/common_utils/src/id_type.rs
@@ -248,7 +248,6 @@ pub trait GenerateId {
#[cfg(test)]
mod alphanumeric_id_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
const VALID_UNDERSCORE_ID_JSON: &str = r#""cus_abcdefghijklmnopqrstuv""#;
diff --git a/crates/common_utils/src/id_type/global_id.rs b/crates/common_utils/src/id_type/global_id.rs
index b9ed173ce3..636e4ec61e 100644
--- a/crates/common_utils/src/id_type/global_id.rs
+++ b/crates/common_utils/src/id_type/global_id.rs
@@ -191,7 +191,6 @@ impl<'de> serde::Deserialize<'de> for GlobalId {
#[cfg(test)]
mod global_id_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
#[test]
diff --git a/crates/common_utils/src/lib.rs b/crates/common_utils/src/lib.rs
index 51630fd6a1..32ff6c9ace 100644
--- a/crates/common_utils/src/lib.rs
+++ b/crates/common_utils/src/lib.rs
@@ -331,7 +331,6 @@ mod base64_serializer {
#[cfg(test)]
mod nanoid_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
use crate::{
consts::{
diff --git a/crates/common_utils/src/macros.rs b/crates/common_utils/src/macros.rs
index dd736d0af3..d994815653 100644
--- a/crates/common_utils/src/macros.rs
+++ b/crates/common_utils/src/macros.rs
@@ -694,8 +694,6 @@ macro_rules! impl_enum_str {
// --- Tests ---
#[cfg(test)]
mod tests {
- #![allow(clippy::panic, clippy::expect_used)]
-
use serde_json::{json, Value as JsonValue};
use crate::impl_enum_str;
diff --git a/crates/common_utils/src/payout_method_utils.rs b/crates/common_utils/src/payout_method_utils.rs
index 7377096ee6..ecb1795d5f 100644
--- a/crates/common_utils/src/payout_method_utils.rs
+++ b/crates/common_utils/src/payout_method_utils.rs
@@ -1,6 +1,5 @@
//! This module has common utilities for payout method data in HyperSwitch
-use common_enums;
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use masking::Secret;
use serde::{Deserialize, Serialize};
diff --git a/crates/common_utils/src/types.rs b/crates/common_utils/src/types.rs
index f31b1f0f52..e5b66cb272 100644
--- a/crates/common_utils/src/types.rs
+++ b/crates/common_utils/src/types.rs
@@ -768,7 +768,6 @@ pub struct TimeRange {
#[cfg(test)]
mod amount_conversion_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
const TWO_DECIMAL_CURRENCY: enums::Currency = enums::Currency::USD;
const THREE_DECIMAL_CURRENCY: enums::Currency = enums::Currency::BHD;
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 02ef0d388c..37a35f19d5 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -9,7 +9,6 @@ use api_models::{
payments,
};
use serde::{Deserialize, Serialize};
-use toml;
use crate::common_config::{CardProvider, InputData, Provider, ZenApplePay};
diff --git a/crates/currency_conversion/src/conversion.rs b/crates/currency_conversion/src/conversion.rs
index 479b6986a7..73d86bfb75 100644
--- a/crates/currency_conversion/src/conversion.rs
+++ b/crates/currency_conversion/src/conversion.rs
@@ -28,7 +28,6 @@ pub fn convert(
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::print_stdout)]
use std::collections::HashMap;
use crate::types::CurrencyFactors;
diff --git a/crates/diesel_models/src/authentication.rs b/crates/diesel_models/src/authentication.rs
index 07de55d595..f0f84650fb 100644
--- a/crates/diesel_models/src/authentication.rs
+++ b/crates/diesel_models/src/authentication.rs
@@ -8,7 +8,6 @@ use common_utils::{
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use error_stack::ResultExt;
use serde::{self, Deserialize, Serialize};
-use serde_json;
use crate::schema::authentication;
diff --git a/crates/diesel_models/src/process_tracker.rs b/crates/diesel_models/src/process_tracker.rs
index 962f917788..3b060f299a 100644
--- a/crates/diesel_models/src/process_tracker.rs
+++ b/crates/diesel_models/src/process_tracker.rs
@@ -198,7 +198,6 @@ impl From<ProcessTrackerUpdate> for ProcessTrackerUpdateInternal {
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
use common_utils::ext_traits::StringExt;
use super::ProcessTrackerRunner;
diff --git a/crates/diesel_models/src/query/utils.rs b/crates/diesel_models/src/query/utils.rs
index 98589804a3..10d7c07cf7 100644
--- a/crates/diesel_models/src/query/utils.rs
+++ b/crates/diesel_models/src/query/utils.rs
@@ -1,5 +1,3 @@
-use diesel;
-
use crate::{schema, schema_v2};
/// This trait will return a single column as primary key even in case of composite primary key.
diff --git a/crates/diesel_models/src/tokenization.rs b/crates/diesel_models/src/tokenization.rs
index 62fecdcf5e..db10577294 100644
--- a/crates/diesel_models/src/tokenization.rs
+++ b/crates/diesel_models/src/tokenization.rs
@@ -1,6 +1,4 @@
#[cfg(feature = "v2")]
-use common_enums;
-#[cfg(feature = "v2")]
use common_utils::id_type;
#[cfg(feature = "v2")]
use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
diff --git a/crates/drainer/Cargo.toml b/crates/drainer/Cargo.toml
index 800622cf36..217726d101 100644
--- a/crates/drainer/Cargo.toml
+++ b/crates/drainer/Cargo.toml
@@ -28,7 +28,7 @@ serde = "1.0.219"
serde_json = "1.0.140"
serde_path_to_error = "0.1.17"
thiserror = "1.0.69"
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
# First Party Crates
common_utils = { version = "0.1.0", path = "../common_utils", features = ["signals"] }
diff --git a/crates/euclid/src/backend/vir_interpreter.rs b/crates/euclid/src/backend/vir_interpreter.rs
index 67f59594bb..3fba1607cd 100644
--- a/crates/euclid/src/backend/vir_interpreter.rs
+++ b/crates/euclid/src/backend/vir_interpreter.rs
@@ -106,7 +106,6 @@ where
}
#[cfg(all(test, feature = "ast_parser"))]
mod test {
- #![allow(clippy::expect_used)]
use common_utils::types::MinorUnit;
use rustc_hash::FxHashMap;
diff --git a/crates/euclid/src/dssa/analyzer.rs b/crates/euclid/src/dssa/analyzer.rs
index fb5cfc957c..74d7081ad1 100644
--- a/crates/euclid/src/dssa/analyzer.rs
+++ b/crates/euclid/src/dssa/analyzer.rs
@@ -240,8 +240,6 @@ pub fn analyze<O: EuclidAnalysable + EuclidDirFilter>(
#[cfg(all(test, feature = "ast_parser"))]
mod tests {
- #![allow(clippy::panic, clippy::expect_used)]
-
use std::{ops::Deref, sync::Weak};
use euclid_macros::knowledge;
diff --git a/crates/euclid/src/dssa/graph.rs b/crates/euclid/src/dssa/graph.rs
index 526667d362..6860480a28 100644
--- a/crates/euclid/src/dssa/graph.rs
+++ b/crates/euclid/src/dssa/graph.rs
@@ -509,8 +509,6 @@ impl CgraphExt for cgraph::ConstraintGraph<dir::DirValue> {
#[cfg(test)]
mod test {
- #![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
-
use std::ops::Deref;
use euclid_macros::knowledge;
diff --git a/crates/euclid/src/dssa/state_machine.rs b/crates/euclid/src/dssa/state_machine.rs
index bce27ebc5f..ea954db5cd 100644
--- a/crates/euclid/src/dssa/state_machine.rs
+++ b/crates/euclid/src/dssa/state_machine.rs
@@ -519,8 +519,6 @@ pub fn make_connector_selection_data<O: EuclidAnalysable>(
#[cfg(all(test, feature = "ast_parser"))]
mod tests {
- #![allow(clippy::expect_used)]
-
use super::*;
use crate::{dirval, frontend::ast, types::DummyOutput};
diff --git a/crates/euclid/src/frontend/dir.rs b/crates/euclid/src/frontend/dir.rs
index 62dbefab3f..c15d069017 100644
--- a/crates/euclid/src/frontend/dir.rs
+++ b/crates/euclid/src/frontend/dir.rs
@@ -929,7 +929,6 @@ pub struct DirProgram<O> {
#[cfg(test)]
mod test {
- #![allow(clippy::expect_used)]
use rustc_hash::FxHashMap;
use strum::IntoEnumIterator;
diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.toml
index d6bbaf583f..b6fbef2e57 100644
--- a/crates/external_services/Cargo.toml
+++ b/crates/external_services/Cargo.toml
@@ -58,7 +58,7 @@ vaultrs = { version = "0.7.4", optional = true }
prost = { version = "0.13", optional = true }
prost-types = { version = "0.13", optional = true }
time = { version = "0.3.41", features = ["serde", "serde-well-known", "std"] }
-tokio = "1.45.1"
+tokio = "1.48.0"
tonic = "0.13.1"
tonic-reflection = "0.13.1"
tonic-types = "0.13.1"
diff --git a/crates/external_services/build.rs b/crates/external_services/build.rs
index 993d25e5ab..2e0ac1ef1b 100644
--- a/crates/external_services/build.rs
+++ b/crates/external_services/build.rs
@@ -1,4 +1,3 @@
-#[allow(clippy::expect_used)]
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Compilation for revenue recovery protos
#[cfg(feature = "revenue_recovery")]
@@ -6,6 +5,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let proto_base_path = router_env::workspace_path().join("proto");
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR")?);
let recovery_proto_files = [proto_base_path.join("recovery_decider.proto")];
+
+ #[allow(clippy::expect_used, clippy::unwrap_in_result)]
tonic_build::configure()
.out_dir(&out_dir)
.compile_well_known_types(true)
@@ -26,6 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR")?);
// Compile the .proto file
+ #[allow(clippy::expect_used, clippy::unwrap_in_result)]
tonic_build::configure()
.out_dir(out_dir)
.compile_protos(
diff --git a/crates/external_services/src/aws_kms/core.rs b/crates/external_services/src/aws_kms/core.rs
index d8af84931a..f71a600f3f 100644
--- a/crates/external_services/src/aws_kms/core.rs
+++ b/crates/external_services/src/aws_kms/core.rs
@@ -167,7 +167,6 @@ impl AwsKmsConfig {
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::print_stdout)]
#[tokio::test]
async fn check_aws_kms_encryption() {
std::env::set_var("AWS_SECRET_ACCESS_KEY", "YOUR SECRET ACCESS KEY");
diff --git a/crates/external_services/src/crm.rs b/crates/external_services/src/crm.rs
index ef2982fb38..bbe3f5b234 100644
--- a/crates/external_services/src/crm.rs
+++ b/crates/external_services/src/crm.rs
@@ -12,7 +12,6 @@ use hyperswitch_interfaces::{
errors::HttpClientError,
types::Proxy,
};
-use reqwest;
use router_env::logger;
use crate::{http_client, hubspot_proxy::HubspotRequest};
diff --git a/crates/external_services/src/grpc_client.rs b/crates/external_services/src/grpc_client.rs
index e33cbc7a62..49e1e054a3 100644
--- a/crates/external_services/src/grpc_client.rs
+++ b/crates/external_services/src/grpc_client.rs
@@ -23,7 +23,6 @@ use health_check_client::HealthCheckClient;
use hyper_util::client::legacy::connect::HttpConnector;
#[cfg(any(feature = "dynamic_routing", feature = "revenue_recovery"))]
use router_env::logger;
-use serde_urlencoded;
#[cfg(any(feature = "dynamic_routing", feature = "revenue_recovery"))]
use tonic::body::Body;
use typed_builder::TypedBuilder;
diff --git a/crates/external_services/src/grpc_client/dynamic_routing.rs b/crates/external_services/src/grpc_client/dynamic_routing.rs
index f4aeec7655..5b2e45540c 100644
--- a/crates/external_services/src/grpc_client/dynamic_routing.rs
+++ b/crates/external_services/src/grpc_client/dynamic_routing.rs
@@ -5,7 +5,6 @@ use std::fmt::Debug;
use common_utils::errors::CustomResult;
use router_env::logger;
-use serde;
/// Elimination Routing Client Interface Implementation
pub mod elimination_based_client;
/// Success Routing Client Interface Implementation
diff --git a/crates/hsdev/src/main.rs b/crates/hsdev/src/main.rs
index 2c368339c8..4d2327553e 100644
--- a/crates/hsdev/src/main.rs
+++ b/crates/hsdev/src/main.rs
@@ -91,8 +91,6 @@ pub fn get_toml_table<'a>(table_name: &'a str, toml_data: &'a Value) -> &'a Valu
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
-
use std::str::FromStr;
use toml::Value;
diff --git a/crates/hyperswitch_connectors/src/connectors/amazonpay.rs b/crates/hyperswitch_connectors/src/connectors/amazonpay.rs
index c5a698b92b..e6d51f3c57 100644
--- a/crates/hyperswitch_connectors/src/connectors/amazonpay.rs
+++ b/crates/hyperswitch_connectors/src/connectors/amazonpay.rs
@@ -13,7 +13,6 @@ use common_utils::{
types::{AmountConvertor, StringMajorUnit, StringMajorUnitForConnector},
};
use error_stack::{report, ResultExt};
-use hex;
use hyperswitch_domain_models::{
payment_method_data::{PaymentMethodData, WalletData as WalletDataPaymentMethod},
router_data::{AccessToken, ErrorResponse, RouterData},
diff --git a/crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs b/crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
index ae47bb96cc..bc6a1be658 100644
--- a/crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
@@ -1,4 +1,3 @@
-use cards;
use common_enums::enums;
use common_utils::types::FloatMajorUnit;
use hyperswitch_domain_models::{
diff --git a/crates/hyperswitch_connectors/src/connectors/nmi.rs b/crates/hyperswitch_connectors/src/connectors/nmi.rs
index cf948d2124..65fb134df0 100644
--- a/crates/hyperswitch_connectors/src/connectors/nmi.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nmi.rs
@@ -11,7 +11,6 @@ use common_utils::{
types::{AmountConvertor, FloatMajorUnit, FloatMajorUnitForConnector},
};
use error_stack::{report, ResultExt};
-use hex;
use hyperswitch_domain_models::{
router_data::{AccessToken, ErrorResponse, RouterData},
router_flow_types::{
diff --git a/crates/hyperswitch_connectors/src/connectors/payjustnow.rs b/crates/hyperswitch_connectors/src/connectors/payjustnow.rs
index d2107fad1c..ba5069b478 100644
--- a/crates/hyperswitch_connectors/src/connectors/payjustnow.rs
+++ b/crates/hyperswitch_connectors/src/connectors/payjustnow.rs
@@ -2,7 +2,6 @@ pub mod transformers;
use std::sync::LazyLock;
-use api_models;
use base64::Engine;
use common_enums::enums;
use common_utils::{
diff --git a/crates/hyperswitch_connectors/src/connectors/riskified/transformers/auth.rs b/crates/hyperswitch_connectors/src/connectors/riskified/transformers/auth.rs
index 2835ea01f8..85beeedaed 100644
--- a/crates/hyperswitch_connectors/src/connectors/riskified/transformers/auth.rs
+++ b/crates/hyperswitch_connectors/src/connectors/riskified/transformers/auth.rs
@@ -1,4 +1,3 @@
-use error_stack;
use hyperswitch_domain_models::router_data::ConnectorAuthType;
use hyperswitch_interfaces::errors::ConnectorError;
use masking::{ExposeInterface, Secret};
diff --git a/crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs b/crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs
index 1462e2e729..c4783c4d3a 100644
--- a/crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs
+++ b/crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs
@@ -1,4 +1,3 @@
-use error_stack;
use hyperswitch_domain_models::router_data::ConnectorAuthType;
use hyperswitch_interfaces::errors::ConnectorError;
use masking::Secret;
diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
index 66a6e74538..e2c7a08b06 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
@@ -4904,7 +4904,6 @@ where
#[cfg(test)]
mod test_validate_shipping_address_against_payment_method {
- #![allow(clippy::unwrap_used)]
use common_enums::CountryAlpha2;
use hyperswitch_interfaces::errors::ConnectorError;
use masking::Secret;
diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs
index 145d21ddaf..58409f2b25 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs
@@ -1,4 +1,3 @@
-use api_models;
use common_enums::{enums, Currency};
use common_utils::{ext_traits::OptionExt as _, pii::Email};
use error_stack::ResultExt;
diff --git a/crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs b/crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
index befb962553..cd541a5dc3 100644
--- a/crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
@@ -1,4 +1,3 @@
-use cards;
use common_enums::enums;
use common_utils::types::StringMinorUnit;
use error_stack::ResultExt;
diff --git a/crates/hyperswitch_domain_models/src/connector_endpoints.rs b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
index a9e7bebe12..84383466d3 100644
--- a/crates/hyperswitch_domain_models/src/connector_endpoints.rs
+++ b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
@@ -2,7 +2,6 @@
use common_enums::{connector_enums, ApplicationError};
use common_utils::errors::CustomResult;
use masking::Secret;
-use router_derive;
use serde::Deserialize;
use crate::errors::api_error_response;
diff --git a/crates/hyperswitch_domain_models/src/payment_methods.rs b/crates/hyperswitch_domain_models/src/payment_methods.rs
index 7b0fa8f7ff..c174ec1a00 100644
--- a/crates/hyperswitch_domain_models/src/payment_methods.rs
+++ b/crates/hyperswitch_domain_models/src/payment_methods.rs
@@ -1260,7 +1260,6 @@ impl<'a> PaymentMethodBalanceData<'a> {
#[cfg(feature = "v1")]
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
use id_type::MerchantConnectorAccountId;
use super::*;
diff --git a/crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs b/crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs
index 4d7f4bfdf4..407250709a 100644
--- a/crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs
+++ b/crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs
@@ -1,5 +1,3 @@
-use api_models;
-use common_enums;
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
pii::Email,
diff --git a/crates/hyperswitch_domain_models/src/routing.rs b/crates/hyperswitch_domain_models/src/routing.rs
index baa2d45ab4..02ab73e5e8 100644
--- a/crates/hyperswitch_domain_models/src/routing.rs
+++ b/crates/hyperswitch_domain_models/src/routing.rs
@@ -2,7 +2,6 @@ use std::collections::HashMap;
use api_models::{enums as api_enums, routing};
use common_utils::id_type;
-use serde;
#[cfg(feature = "v1")]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
diff --git a/crates/hyperswitch_domain_models/src/tokenization.rs b/crates/hyperswitch_domain_models/src/tokenization.rs
index 20d283a5f1..d157445a79 100644
--- a/crates/hyperswitch_domain_models/src/tokenization.rs
+++ b/crates/hyperswitch_domain_models/src/tokenization.rs
@@ -1,4 +1,3 @@
-use common_enums;
use common_utils::{
self, date_time,
errors::{CustomResult, ValidationError},
diff --git a/crates/hyperswitch_domain_models/src/vault.rs b/crates/hyperswitch_domain_models/src/vault.rs
index 94f23b4fbb..3383a96cc0 100644
--- a/crates/hyperswitch_domain_models/src/vault.rs
+++ b/crates/hyperswitch_domain_models/src/vault.rs
@@ -1,6 +1,4 @@
use api_models::payment_methods;
-#[cfg(feature = "v2")]
-use error_stack;
use serde::{Deserialize, Serialize};
#[cfg(feature = "v2")]
diff --git a/crates/injector/Cargo.toml b/crates/injector/Cargo.toml
index 6f30a67733..3cffd170ac 100644
--- a/crates/injector/Cargo.toml
+++ b/crates/injector/Cargo.toml
@@ -25,9 +25,9 @@ reqwest = { version = "0.12.0", features = ["json", "stream", "rustls-tls"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = { version = "1.0.140" }
thiserror = { version = "1.0.69" }
-tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
tracing = { version = "0.1.40" }
url = { version = "2.5.4", features = ["serde"] }
[lints]
-workspace = true
\ No newline at end of file
+workspace = true
diff --git a/crates/injector/src/injector.rs b/crates/injector/src/injector.rs
index 705101bc03..c32f5fd788 100644
--- a/crates/injector/src/injector.rs
+++ b/crates/injector/src/injector.rs
@@ -785,7 +785,6 @@ pub mod core {
pub use core::*;
#[cfg(test)]
-#[allow(clippy::unwrap_used)]
mod tests {
use std::collections::HashMap;
@@ -950,7 +949,7 @@ mod tests {
// Check that our test tokens were replaced with the actual values from vault data
let tokens_replaced = response_str.contains("4242429789164242") && // card_number
- response_str.contains("123") && // cvv
+ response_str.contains("123") && // cvv
response_str.contains("12/25"); // expiry
assert!(
diff --git a/crates/injector/src/vault_metadata.rs b/crates/injector/src/vault_metadata.rs
index 836ad95b53..71b86b2709 100644
--- a/crates/injector/src/vault_metadata.rs
+++ b/crates/injector/src/vault_metadata.rs
@@ -293,7 +293,6 @@ impl VaultMetadataExtractorExt for ConnectionConfig {
}
#[cfg(test)]
-#[allow(clippy::expect_used)]
mod tests {
use std::collections::HashMap;
diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rs
index d011086f96..6ba4bcb016 100644
--- a/crates/kgraph_utils/src/mca.rs
+++ b/crates/kgraph_utils/src/mca.rs
@@ -1062,8 +1062,6 @@ pub fn make_mca_graph(
#[cfg(feature = "v1")]
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used)]
-
use std::collections::{HashMap, HashSet};
use api_models::enums as api_enums;
diff --git a/crates/masking/src/secret.rs b/crates/masking/src/secret.rs
index 7706e019f0..0650dfe7ee 100644
--- a/crates/masking/src/secret.rs
+++ b/crates/masking/src/secret.rs
@@ -288,7 +288,6 @@ mod tests {
use super::*;
#[test]
- #[allow(clippy::expect_used)]
fn test_json_mask_strategy() {
// Create a sample JSON with different types for testing
let original = json!({ "user": { "name": "John Doe", "email": "[email protected]", "age": 35, "verified": true }, "card": { "number": "4242424242424242", "cvv": 123, "amount": 99.99 }, "tags": ["personal", "premium"], "null_value": null, "short": "hi" });
diff --git a/crates/masking/tests/basic.rs b/crates/masking/tests/basic.rs
index 29ba90cbea..0e67f3480d 100644
--- a/crates/masking/tests/basic.rs
+++ b/crates/masking/tests/basic.rs
@@ -1,4 +1,4 @@
-#![allow(dead_code, clippy::unwrap_used, clippy::panic_in_result_fn)]
+#![allow(dead_code, clippy::panic_in_result_fn)]
use masking::Secret;
#[cfg(feature = "serde")]
@@ -9,7 +9,7 @@ use masking::ZeroizableSecret;
use serde::Serialize;
#[test]
-fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+fn basic() {
#[cfg_attr(feature = "serde", derive(Serialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct AccountNumber(String);
@@ -61,12 +61,10 @@ fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}
// end
-
- Ok(())
}
#[test]
-fn without_serialize() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+fn without_serialize() {
#[cfg_attr(feature = "serde", derive(Serialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct AccountNumber(String);
@@ -111,12 +109,10 @@ fn without_serialize() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}
// end
-
- Ok(())
}
#[test]
-fn for_string() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+fn for_string() {
#[cfg_attr(all(feature = "alloc", feature = "serde"), derive(Serialize))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Composite {
@@ -155,6 +151,4 @@ fn for_string() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
}
// end
-
- Ok(())
}
diff --git a/crates/openapi/src/routes/subscriptions.rs b/crates/openapi/src/routes/subscriptions.rs
index b12d481885..b4dced29f0 100644
--- a/crates/openapi/src/routes/subscriptions.rs
+++ b/crates/openapi/src/routes/subscriptions.rs
@@ -1,5 +1,4 @@
use serde_json::json;
-use utoipa;
/// Subscription - Create and Confirm
///
@@ -362,7 +361,7 @@ pub async fn pause_subscription() {}
"Resume subscription" = (
value = json!({
"resume_option": "immediately",
- "unpaid_invoices_handling": "schedule_payment_collection"
+ "unpaid_invoices_handling": "schedule_payment_collection"
})
)
))
diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
index 4d1f06f21b..825041e802 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -3822,8 +3822,6 @@ fn get_bank_transfer_required_fields() -> HashMap<enums::PaymentMethodType, Conn
#[test]
fn test_required_fields_to_json() {
- #![allow(clippy::unwrap_used)]
-
// Test billing fields
let billing_fields = get_billing_required_fields();
// let billing_json = serde_json::to_string_pretty(&billing_fields)?;
diff --git a/crates/redis_interface/Cargo.toml b/crates/redis_interface/Cargo.toml
index 6e77d37a53..67a86c5b4c 100644
--- a/crates/redis_interface/Cargo.toml
+++ b/crates/redis_interface/Cargo.toml
@@ -16,7 +16,7 @@ fred = { version = "7.1.2", features = ["metrics", "partial-tracing", "subscribe
futures = "0.3"
serde = { version = "1.0.219", features = ["derive"] }
thiserror = "1.0.69"
-tokio = "1.45.1"
+tokio = "1.48.0"
tokio-stream = { version = "0.1.17", features = ["sync"] }
tracing = { workspace = true }
@@ -24,7 +24,7 @@ tracing = { workspace = true }
common_utils = { version = "0.1.0", path = "../common_utils", features = ["async_ext"] }
[dev-dependencies]
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
[lints]
workspace = true
diff --git a/crates/redis_interface/src/commands.rs b/crates/redis_interface/src/commands.rs
index 54e7eed7f1..ad26c9cd1b 100644
--- a/crates/redis_interface/src/commands.rs
+++ b/crates/redis_interface/src/commands.rs
@@ -1205,8 +1205,6 @@ impl super::RedisConnectionPool {
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::unwrap_used)]
-
use std::collections::HashMap;
use crate::{errors::RedisError, RedisConnectionPool, RedisEntryId, RedisSettings};
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index 8e75fe5bcb..3783f13adc 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -105,7 +105,7 @@ strum = { version = "0.26", features = ["derive"] }
tera = "1.20.0"
thiserror = "1.0.69"
time = { version = "0.3.41", features = ["serde", "serde-well-known", "std", "parsing", "serde-human-readable"] }
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
totp-rs = { version = "5.7.0", features = ["gen_secret", "otpauth"] }
tracing-futures = { version = "0.2.5", features = ["tokio"] }
unicode-segmentation = "1.12.0"
@@ -155,7 +155,7 @@ derive_deref = "1.1.1"
rand = "0.8.5"
serial_test = "3.2.0"
time = { version = "0.3.41", features = ["macros"] }
-tokio = "1.45.1"
+tokio = "1.48.0"
wiremock = "0.6.3"
# First party dev-dependencies
diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs
index 13bcee2724..6f8ab80b6b 100644
--- a/crates/router/src/configs/settings.rs
+++ b/crates/router/src/configs/settings.rs
@@ -1406,7 +1406,6 @@ impl<'de> Deserialize<'de> for TenantConfig {
#[cfg(test)]
mod hashmap_deserialization_test {
- #![allow(clippy::unwrap_used)]
use std::collections::{HashMap, HashSet};
use serde::de::{
@@ -1499,7 +1498,6 @@ mod hashmap_deserialization_test {
#[cfg(test)]
mod hashset_deserialization_test {
- #![allow(clippy::unwrap_used)]
use std::collections::HashSet;
use serde::de::{
diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs
index fe0a378a17..435f3c3a1e 100644
--- a/crates/router/src/connector/utils.rs
+++ b/crates/router/src/connector/utils.rs
@@ -2422,7 +2422,6 @@ pub fn get_card_details(
#[cfg(test)]
mod error_code_error_message_tests {
- #![allow(clippy::unwrap_used)]
use super::*;
struct TestConnector;
diff --git a/crates/router/src/consts.rs b/crates/router/src/consts.rs
index 6e20a8fa26..316e362856 100644
--- a/crates/router/src/consts.rs
+++ b/crates/router/src/consts.rs
@@ -356,8 +356,6 @@ pub mod superposition {
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used)]
-
#[test]
fn test_profile_id_unavailable_initialization() {
// Just access the lazy static to ensure it doesn't panic during initialization
diff --git a/crates/router/src/consts/user.rs b/crates/router/src/consts/user.rs
index 4f681cda25..21bf437f04 100644
--- a/crates/router/src/consts/user.rs
+++ b/crates/router/src/consts/user.rs
@@ -1,4 +1,3 @@
-use common_enums;
use common_utils::consts::MAX_ALLOWED_MERCHANT_NAME_LENGTH;
pub const MAX_NAME_LENGTH: usize = 70;
diff --git a/crates/router/src/core/api_keys.rs b/crates/router/src/core/api_keys.rs
index 34b421d9e1..b6d1b8d739 100644
--- a/crates/router/src/core/api_keys.rs
+++ b/crates/router/src/core/api_keys.rs
@@ -566,7 +566,6 @@ impl From<storage::HashedApiKey> for HashedApiKey {
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::unwrap_used)]
use super::*;
#[tokio::test]
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index 874e4c7172..bfc78c9f71 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -80,7 +80,6 @@ use scheduler::utils as pt_utils;
pub use session_operation::payments_session_core;
#[cfg(feature = "olap")]
use strum::IntoEnumIterator;
-use time;
#[cfg(feature = "v1")]
pub use self::operations::{
diff --git a/crates/router/src/core/payments/access_token.rs b/crates/router/src/core/payments/access_token.rs
index b38d55a95f..619d9cb610 100644
--- a/crates/router/src/core/payments/access_token.rs
+++ b/crates/router/src/core/payments/access_token.rs
@@ -1,6 +1,5 @@
use std::fmt::Debug;
-use common_enums;
use common_utils::ext_traits::AsyncExt;
use error_stack::ResultExt;
use hyperswitch_interfaces::api::ConnectorSpecifications;
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index 72ee7c72b0..4145ffc9b2 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -4084,8 +4084,6 @@ pub(crate) fn get_payment_id_from_client_secret(cs: &str) -> RouterResult<String
#[cfg(feature = "v1")]
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
-
use super::*;
#[test]
@@ -5028,7 +5026,6 @@ pub fn is_manual_retry_allowed(
#[cfg(test)]
mod test {
- #![allow(clippy::unwrap_used)]
#[test]
fn test_client_secret_parse() {
let client_secret1 = "pay_3TgelAms4RQec8xSStjF_secret_fc34taHLw1ekPgNh92qr";
diff --git a/crates/router/src/core/payments/operations/payment_cancel.rs b/crates/router/src/core/payments/operations/payment_cancel.rs
index 4b004fad2a..62f36ecf5a 100644
--- a/crates/router/src/core/payments/operations/payment_cancel.rs
+++ b/crates/router/src/core/payments/operations/payment_cancel.rs
@@ -4,7 +4,6 @@ use api_models::enums::FrmSuggestion;
use async_trait::async_trait;
use common_utils::ext_traits::AsyncExt;
use error_stack::ResultExt;
-use router_derive;
use router_env::{instrument, tracing};
use super::{BoxedOperation, Domain, GetTracker, Operation, UpdateTracker, ValidateRequest};
diff --git a/crates/router/src/core/payments/operations/payment_cancel_post_capture.rs b/crates/router/src/core/payments/operations/payment_cancel_post_capture.rs
index 33890876bf..f55e0b59e1 100644
--- a/crates/router/src/core/payments/operations/payment_cancel_post_capture.rs
+++ b/crates/router/src/core/payments/operations/payment_cancel_post_capture.rs
@@ -3,7 +3,6 @@ use std::marker::PhantomData;
use api_models::enums::FrmSuggestion;
use async_trait::async_trait;
use error_stack::ResultExt;
-use router_derive;
use router_env::{instrument, tracing};
use super::{BoxedOperation, Domain, GetTracker, Operation, UpdateTracker, ValidateRequest};
diff --git a/crates/router/src/core/payments/operations/payment_cancel_v2.rs b/crates/router/src/core/payments/operations/payment_cancel_v2.rs
index e54de6cb79..11a255dc7b 100644
--- a/crates/router/src/core/payments/operations/payment_cancel_v2.rs
+++ b/crates/router/src/core/payments/operations/payment_cancel_v2.rs
@@ -2,7 +2,6 @@ use std::marker::PhantomData;
use api_models::enums::FrmSuggestion;
use async_trait::async_trait;
-use common_enums;
use common_utils::{ext_traits::AsyncExt, id_type::GlobalPaymentId};
use error_stack::ResultExt;
use router_env::{instrument, tracing};
diff --git a/crates/router/src/core/payments/operations/payment_reject.rs b/crates/router/src/core/payments/operations/payment_reject.rs
index f40b90c667..f0a437a59a 100644
--- a/crates/router/src/core/payments/operations/payment_reject.rs
+++ b/crates/router/src/core/payments/operations/payment_reject.rs
@@ -3,7 +3,6 @@ use std::marker::PhantomData;
use api_models::{enums::FrmSuggestion, payments::PaymentsCancelRequest};
use async_trait::async_trait;
use error_stack::ResultExt;
-use router_derive;
use router_env::{instrument, tracing};
use super::{BoxedOperation, Domain, GetTracker, Operation, UpdateTracker, ValidateRequest};
diff --git a/crates/router/src/core/payments/operations/payment_response.rs b/crates/router/src/core/payments/operations/payment_response.rs
index b8bc1e37e7..36c775ca9d 100644
--- a/crates/router/src/core/payments/operations/payment_response.rs
+++ b/crates/router/src/core/payments/operations/payment_response.rs
@@ -18,7 +18,6 @@ use hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt;
use hyperswitch_domain_models::payments::{
PaymentConfirmData, PaymentIntentData, PaymentStatusData,
};
-use router_derive;
use router_env::{instrument, logger, tracing};
use storage_impl::DataModelExt;
use tracing_futures::Instrument;
diff --git a/crates/router/src/core/payments/operations/payments_extend_authorization.rs b/crates/router/src/core/payments/operations/payments_extend_authorization.rs
index fdaaf1aef4..5cef12a056 100644
--- a/crates/router/src/core/payments/operations/payments_extend_authorization.rs
+++ b/crates/router/src/core/payments/operations/payments_extend_authorization.rs
@@ -3,7 +3,6 @@ use std::marker::PhantomData;
use api_models::enums::FrmSuggestion;
use async_trait::async_trait;
use error_stack::ResultExt;
-use router_derive;
use router_env::{instrument, tracing};
use super::{BoxedOperation, Domain, GetTracker, Operation, UpdateTracker, ValidateRequest};
diff --git a/crates/router/src/core/payouts.rs b/crates/router/src/core/payouts.rs
index c65bd0d795..d937f2fd12 100644
--- a/crates/router/src/core/payouts.rs
+++ b/crates/router/src/core/payouts.rs
@@ -35,7 +35,6 @@ use masking::{PeekInterface, Secret};
use retry::GsmValidation;
use router_env::{instrument, logger, tracing, Env};
use scheduler::utils as pt_utils;
-use serde_json;
use time::Duration;
#[cfg(feature = "olap")]
diff --git a/crates/router/src/core/pm_auth.rs b/crates/router/src/core/pm_auth.rs
index 9823cc94d7..f9ef014da1 100644
--- a/crates/router/src/core/pm_auth.rs
+++ b/crates/router/src/core/pm_auth.rs
@@ -5,7 +5,6 @@ use api_models::{
payment_methods::{self, BankAccountAccessCreds},
};
use common_enums::{enums::MerchantStorageScheme, PaymentMethodType};
-use hex;
pub mod helpers;
pub mod transformers;
diff --git a/crates/router/src/core/tokenization.rs b/crates/router/src/core/tokenization.rs
index b2b878e41c..1d2d1ac973 100644
--- a/crates/router/src/core/tokenization.rs
+++ b/crates/router/src/core/tokenization.rs
@@ -1,8 +1,6 @@
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use actix_web::{web, HttpRequest, HttpResponse};
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
-use api_models;
-#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use common_enums::enums;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use common_utils::{
@@ -15,8 +13,6 @@ use common_utils::{
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use error_stack::ResultExt;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
-use hyperswitch_domain_models;
-#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use router_env::{instrument, logger, tracing, Flow};
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use serde::Serialize;
diff --git a/crates/router/src/core/utils.rs b/crates/router/src/core/utils.rs
index 841691cbfe..f1a6a12e44 100644
--- a/crates/router/src/core/utils.rs
+++ b/crates/router/src/core/utils.rs
@@ -768,7 +768,6 @@ pub fn get_split_refunds(
}
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used)]
use super::*;
#[test]
diff --git a/crates/router/src/core/webhooks/outgoing_v2.rs b/crates/router/src/core/webhooks/outgoing_v2.rs
index cc93f4a385..d0d2938e6b 100644
--- a/crates/router/src/core/webhooks/outgoing_v2.rs
+++ b/crates/router/src/core/webhooks/outgoing_v2.rs
@@ -6,7 +6,6 @@ use diesel_models::process_tracker::business_status;
use error_stack::{report, Report, ResultExt};
use hyperswitch_domain_models::type_encryption::{crypto_operation, CryptoOperation};
use hyperswitch_interfaces::consts;
-use masking;
use router_env::{
instrument,
tracing::{self, Instrument},
diff --git a/crates/router/src/db/api_keys.rs b/crates/router/src/db/api_keys.rs
index 0d3ec5dc8c..140d1fb4a3 100644
--- a/crates/router/src/db/api_keys.rs
+++ b/crates/router/src/db/api_keys.rs
@@ -388,7 +388,6 @@ mod tests {
types::storage,
};
- #[allow(clippy::unwrap_used)]
#[tokio::test]
async fn test_mockdb_api_key_interface() {
#[allow(clippy::expect_used)]
@@ -484,13 +483,11 @@ mod tests {
);
}
- #[allow(clippy::unwrap_used)]
#[tokio::test]
async fn test_api_keys_cache() {
let merchant_id =
common_utils::id_type::MerchantId::try_from(Cow::from("test_merchant")).unwrap();
- #[allow(clippy::expect_used)]
let db = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
diff --git a/crates/router/src/db/dispute.rs b/crates/router/src/db/dispute.rs
index 02877131c9..9a890a317e 100644
--- a/crates/router/src/db/dispute.rs
+++ b/crates/router/src/db/dispute.rs
@@ -452,7 +452,6 @@ impl DisputeInterface for MockDb {
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::unwrap_used)]
mod mockdb_dispute_interface {
use std::borrow::Cow;
diff --git a/crates/router/src/db/events.rs b/crates/router/src/db/events.rs
index 35496157a0..49b1869b36 100644
--- a/crates/router/src/db/events.rs
+++ b/crates/router/src/db/events.rs
@@ -886,11 +886,9 @@ mod tests {
},
};
- #[allow(clippy::unwrap_used)]
#[tokio::test]
#[cfg(feature = "v1")]
async fn test_mockdb_event_interface() {
- #[allow(clippy::expect_used)]
let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
@@ -1003,11 +1001,9 @@ mod tests {
assert_eq!(updated_event.event_id, event_id);
}
- #[allow(clippy::unwrap_used)]
#[tokio::test]
#[cfg(feature = "v2")]
async fn test_mockdb_event_interface() {
- #[allow(clippy::expect_used)]
let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
diff --git a/crates/router/src/db/locker_mock_up.rs b/crates/router/src/db/locker_mock_up.rs
index 9c756355af..c4a8b353fe 100644
--- a/crates/router/src/db/locker_mock_up.rs
+++ b/crates/router/src/db/locker_mock_up.rs
@@ -127,7 +127,6 @@ impl LockerMockUpInterface for MockDb {
#[cfg(test)]
mod tests {
- #[allow(clippy::unwrap_used)]
mod mockdb_locker_mock_up_interface {
use common_utils::{generate_customer_id_of_default_length, id_type};
@@ -164,7 +163,6 @@ mod tests {
#[tokio::test]
async fn find_locker_by_card_id() {
- #[allow(clippy::expect_used)]
let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
@@ -195,7 +193,6 @@ mod tests {
#[tokio::test]
async fn insert_locker_mock_up() {
- #[allow(clippy::expect_used)]
let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
@@ -225,7 +222,6 @@ mod tests {
#[tokio::test]
async fn delete_locker_mock_up() {
- #[allow(clippy::expect_used)]
let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
diff --git a/crates/router/src/db/merchant_connector_account.rs b/crates/router/src/db/merchant_connector_account.rs
index 7b4faf922c..16915f4251 100644
--- a/crates/router/src/db/merchant_connector_account.rs
+++ b/crates/router/src/db/merchant_connector_account.rs
@@ -137,7 +137,6 @@ mod merchant_connector_account_cache_tests {
},
};
- #[allow(clippy::unwrap_used)]
#[tokio::test]
#[cfg(feature = "v1")]
async fn test_connector_profile_id_cache() {
@@ -159,7 +158,6 @@ mod merchant_connector_account_cache_tests {
|| {},
)
.unwrap();
- #[allow(clippy::expect_used)]
let db = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
@@ -324,7 +322,6 @@ mod merchant_connector_account_cache_tests {
.is_none())
}
- #[allow(clippy::unwrap_used)]
#[tokio::test]
#[cfg(feature = "v2")]
async fn test_connector_profile_id_cache() {
@@ -345,7 +342,6 @@ mod merchant_connector_account_cache_tests {
|| {},
)
.unwrap();
- #[allow(clippy::expect_used)]
let db = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create Mock store");
diff --git a/crates/router/src/db/merchant_key_store.rs b/crates/router/src/db/merchant_key_store.rs
index 60c4fa0033..b5af8d1b1a 100644
--- a/crates/router/src/db/merchant_key_store.rs
+++ b/crates/router/src/db/merchant_key_store.rs
@@ -19,7 +19,6 @@ mod tests {
types::domain,
};
- #[allow(clippy::unwrap_used, clippy::expect_used)]
#[tokio::test]
async fn test_mock_db_merchant_key_store_interface() {
let conf = Settings::new().expect("invalid settings");
@@ -38,7 +37,6 @@ mod tests {
|| {},
)
.unwrap();
- #[allow(clippy::expect_used)]
let mock_db = MockDb::new(&redis_interface::RedisSettings::default())
.await
.expect("Failed to create mock DB");
diff --git a/crates/router/src/db/relay.rs b/crates/router/src/db/relay.rs
index 2ead84019d..731db91ea2 100644
--- a/crates/router/src/db/relay.rs
+++ b/crates/router/src/db/relay.rs
@@ -1,5 +1,4 @@
use common_utils::types::keymanager::KeyManagerState;
-use diesel_models;
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::behaviour::{Conversion, ReverseConversion};
use storage_impl::MockDb;
diff --git a/crates/router/src/routes/payment_methods.rs b/crates/router/src/routes/payment_methods.rs
index 0721a57429..77ec410664 100644
--- a/crates/router/src/routes/payment_methods.rs
+++ b/crates/router/src/routes/payment_methods.rs
@@ -1046,7 +1046,6 @@ pub async fn default_payment_method_set_api(
#[cfg(feature = "v1")]
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used)]
use api_models::payment_methods::PaymentMethodListRequest;
use super::*;
diff --git a/crates/router/src/routes/refunds.rs b/crates/router/src/routes/refunds.rs
index 63b6762b0a..99d860f4db 100644
--- a/crates/router/src/routes/refunds.rs
+++ b/crates/router/src/routes/refunds.rs
@@ -1,5 +1,4 @@
use actix_web::{web, HttpRequest, HttpResponse};
-use common_utils;
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
diff --git a/crates/router/src/routes/tokenization.rs b/crates/router/src/routes/tokenization.rs
index cf74d8dd06..4fb4558a97 100644
--- a/crates/router/src/routes/tokenization.rs
+++ b/crates/router/src/routes/tokenization.rs
@@ -4,8 +4,6 @@ use std::sync::Arc;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use actix_web::{web, HttpRequest, HttpResponse};
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
-use api_models;
-#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use common_utils::{
ext_traits::{BytesExt, Encode},
id_type,
@@ -13,8 +11,6 @@ use common_utils::{
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use error_stack::ResultExt;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
-use hyperswitch_domain_models;
-#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use masking::Secret;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
use router_env::{instrument, logger, tracing, Flow};
diff --git a/crates/router/src/services/encryption.rs b/crates/router/src/services/encryption.rs
index 8321eaff96..f600f91e7a 100644
--- a/crates/router/src/services/encryption.rs
+++ b/crates/router/src/services/encryption.rs
@@ -127,8 +127,6 @@ pub fn verify_sign(
#[cfg(test)]
mod tests {
- #![allow(clippy::unwrap_used, clippy::expect_used)]
-
use super::*;
// Keys used for tests
diff --git a/crates/router/src/services/kafka/payment_intent.rs b/crates/router/src/services/kafka/payment_intent.rs
index c396705f35..9af64625c4 100644
--- a/crates/router/src/services/kafka/payment_intent.rs
+++ b/crates/router/src/services/kafka/payment_intent.rs
@@ -4,8 +4,6 @@ use ::common_types::{
primitive_wrappers::{EnablePartialAuthorizationBool, RequestExtendedAuthorizationBool},
};
#[cfg(feature = "v2")]
-use common_enums;
-#[cfg(feature = "v2")]
use common_enums::RequestIncrementalAuthorization;
use common_utils::{
crypto::Encryptable, hashing::HashedString, id_type, pii, types as common_types,
diff --git a/crates/router/src/types/api.rs b/crates/router/src/types/api.rs
index f3ebd63097..9b3168fe39 100644
--- a/crates/router/src/types/api.rs
+++ b/crates/router/src/types/api.rs
@@ -241,7 +241,6 @@ pub enum ConnectorChoice {
#[cfg(test)]
mod test {
- #![allow(clippy::unwrap_used)]
use super::*;
#[test]
diff --git a/crates/router/src/types/api/payments.rs b/crates/router/src/types/api/payments.rs
index 5cf668c63b..c2c7ac3438 100644
--- a/crates/router/src/types/api/payments.rs
+++ b/crates/router/src/types/api/payments.rs
@@ -133,8 +133,6 @@ impl MandateValidationFieldsExt for MandateValidationFields {
#[cfg(feature = "v1")]
#[cfg(test)]
mod payments_test {
- #![allow(clippy::expect_used, clippy::unwrap_used)]
-
use super::*;
#[allow(dead_code)]
diff --git a/crates/router/src/types/api/poll.rs b/crates/router/src/types/api/poll.rs
index 2722b72f67..8a6a1b9758 100644
--- a/crates/router/src/types/api/poll.rs
+++ b/crates/router/src/types/api/poll.rs
@@ -1,5 +1,3 @@
-use serde;
-
#[derive(Default, Debug, serde::Deserialize, serde::Serialize)]
pub struct PollId {
pub poll_id: String,
diff --git a/crates/router/src/types/storage/payment_attempt.rs b/crates/router/src/types/storage/payment_attempt.rs
index 14447af26a..dbcbec6df6 100644
--- a/crates/router/src/types/storage/payment_attempt.rs
+++ b/crates/router/src/types/storage/payment_attempt.rs
@@ -124,7 +124,6 @@ impl AttemptStatusExt for enums::AttemptStatus {
feature = "dummy_connector"
))]
mod tests {
- #![allow(clippy::expect_used, clippy::unwrap_used, clippy::print_stderr)]
use hyperswitch_domain_models::payments::payment_attempt::PaymentAttemptNew;
use tokio::sync::oneshot;
use uuid::Uuid;
diff --git a/crates/router/src/workflows/payment_sync.rs b/crates/router/src/workflows/payment_sync.rs
index 3c813190ff..374e752cde 100644
--- a/crates/router/src/workflows/payment_sync.rs
+++ b/crates/router/src/workflows/payment_sync.rs
@@ -356,7 +356,6 @@ pub async fn recovery_retry_sync_task(
#[cfg(test)]
mod tests {
- #![allow(clippy::expect_used, clippy::unwrap_used)]
use super::*;
#[test]
diff --git a/crates/router/tests/cache.rs b/crates/router/tests/cache.rs
index 7e1fab4bc5..5aba196aed 100644
--- a/crates/router/tests/cache.rs
+++ b/crates/router/tests/cache.rs
@@ -1,4 +1,3 @@
-#![allow(clippy::unwrap_used, clippy::print_stdout)]
use std::sync::Arc;
use router::{configs::settings::Settings, routes, services};
diff --git a/crates/router/tests/connectors/authipay.rs b/crates/router/tests/connectors/authipay.rs
index aa362166fd..8f0a7830dd 100644
--- a/crates/router/tests/connectors/authipay.rs
+++ b/crates/router/tests/connectors/authipay.rs
@@ -1,13 +1,13 @@
use std::str::FromStr;
+
use masking::Secret;
use router::{
- types::{self, api, storage::enums},
core::errors,
+ types::{self, api, storage::enums},
};
-use cards;
+use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
-use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct AuthipayTest;
@@ -27,7 +27,8 @@ impl utils::Connector for AuthipayTest {
utils::to_connector_auth_type(
connector_auth::ConnectorAuthentication::new()
.authipay
- .expect("Missing connector authentication configuration").into(),
+ .expect("Missing connector authentication configuration")
+ .into(),
)
}
@@ -179,7 +180,12 @@ async fn should_void_authorized_payment() {
#[actix_web::test]
async fn should_refund_manually_captured_payment() {
let response = CONNECTOR
- .capture_payment_and_refund(payment_method_details(), None, None, get_default_payment_info())
+ .capture_payment_and_refund(
+ payment_method_details(),
+ None,
+ None,
+ get_default_payment_info(),
+ )
.await
.unwrap();
assert_eq!(
@@ -213,7 +219,12 @@ async fn should_partially_refund_manually_captured_payment() {
#[actix_web::test]
async fn should_sync_manually_captured_refund() {
let refund_response = CONNECTOR
- .capture_payment_and_refund(payment_method_details(), None, None, get_default_payment_info())
+ .capture_payment_and_refund(
+ payment_method_details(),
+ None,
+ None,
+ get_default_payment_info(),
+ )
.await
.unwrap();
let response = CONNECTOR
@@ -234,14 +245,20 @@ async fn should_sync_manually_captured_refund() {
// Creates a payment using the automatic capture flow (Non 3DS).
#[actix_web::test]
async fn should_make_payment() {
- let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap();
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
}
// Synchronizes a payment using the automatic capture flow (Non 3DS).
#[actix_web::test]
async fn should_sync_auto_captured_payment() {
- let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap();
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
let txn_id = utils::get_connector_transaction_id(authorize_response.response);
assert_ne!(txn_id, None, "Empty connector transaction id");
@@ -402,7 +419,10 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
// Voids a payment using automatic capture flow (Non 3DS).
#[actix_web::test]
async fn should_fail_void_payment_for_auto_capture() {
- let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap();
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
let txn_id = utils::get_connector_transaction_id(authorize_response.response);
assert_ne!(txn_id, None, "Empty connector transaction id");
diff --git a/crates/router/tests/connectors/dlocal.rs b/crates/router/tests/connectors/dlocal.rs
index e966279972..0f0d6fa641 100644
--- a/crates/router/tests/connectors/dlocal.rs
+++ b/crates/router/tests/connectors/dlocal.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::print_stdout)]
-
use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
diff --git a/crates/router/tests/customers.rs b/crates/router/tests/customers.rs
index 47194c0f0e..3e1194c923 100644
--- a/crates/router/tests/customers.rs
+++ b/crates/router/tests/customers.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::unwrap_used, clippy::print_stdout)]
-
mod utils;
// setting the connector in environment variables doesn't work when run in parallel. Neither does passing the paymentid
diff --git a/crates/router/tests/integration_demo.rs b/crates/router/tests/integration_demo.rs
index 5ee50c1263..84015af3e0 100644
--- a/crates/router/tests/integration_demo.rs
+++ b/crates/router/tests/integration_demo.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::unwrap_used)]
-
mod utils;
use masking::PeekInterface;
use test_utils::connector_auth::ConnectorAuthentication;
diff --git a/crates/router/tests/macros.rs b/crates/router/tests/macros.rs
index 50244b9951..227f907808 100644
--- a/crates/router/tests/macros.rs
+++ b/crates/router/tests/macros.rs
@@ -1,6 +1,5 @@
#[cfg(test)]
mod flat_struct_test {
- #![allow(clippy::unwrap_used)]
use std::collections::HashMap;
use router_derive::FlatStruct;
@@ -43,8 +42,6 @@ mod flat_struct_test {
#[cfg(test)]
mod validate_schema_test {
- #![allow(clippy::unwrap_used)]
-
use router_derive::ValidateSchema;
use url::Url;
diff --git a/crates/router/tests/payments.rs b/crates/router/tests/payments.rs
index f3cdcf917a..7f6e0fbf4b 100644
--- a/crates/router/tests/payments.rs
+++ b/crates/router/tests/payments.rs
@@ -1,9 +1,4 @@
-#![allow(
- clippy::expect_used,
- clippy::unwrap_in_result,
- clippy::unwrap_used,
- clippy::print_stdout
-)]
+#![allow(clippy::unwrap_in_result)]
mod utils;
diff --git a/crates/router/tests/payments2.rs b/crates/router/tests/payments2.rs
index 0638ee67e7..4a6647b8b0 100644
--- a/crates/router/tests/payments2.rs
+++ b/crates/router/tests/payments2.rs
@@ -1,10 +1,4 @@
-#![allow(
- clippy::expect_used,
- clippy::unwrap_in_result,
- clippy::unwrap_used,
- clippy::print_stdout,
- unused_imports
-)]
+#![allow(clippy::unwrap_in_result)]
mod utils;
@@ -42,7 +36,6 @@ fn connector_list() {
#[ignore]
#[actix_rt::test]
async fn payments_create_core() {
- use db::domain::merchant_context;
use hyperswitch_domain_models::merchant_context::{Context, MerchantContext};
use router::configs::settings::Settings;
let conf = Settings::new().expect("invalid settings");
diff --git a/crates/router/tests/payouts.rs b/crates/router/tests/payouts.rs
index b80623c6b3..aaf747f8ff 100644
--- a/crates/router/tests/payouts.rs
+++ b/crates/router/tests/payouts.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::unwrap_used, clippy::print_stdout)]
-
mod utils;
#[actix_web::test]
diff --git a/crates/router/tests/refunds.rs b/crates/router/tests/refunds.rs
index 3359117d14..5acc827b26 100644
--- a/crates/router/tests/refunds.rs
+++ b/crates/router/tests/refunds.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::unwrap_used, clippy::print_stdout)]
-
use utils::{mk_service, AppClient};
mod utils;
diff --git a/crates/router/tests/services.rs b/crates/router/tests/services.rs
index 36f969dac1..7fe4a2788c 100644
--- a/crates/router/tests/services.rs
+++ b/crates/router/tests/services.rs
@@ -6,7 +6,6 @@ mod utils;
#[tokio::test]
#[should_panic]
-#[allow(clippy::unwrap_used)]
async fn get_redis_conn_failure() {
// Arrange
utils::setup().await;
@@ -38,7 +37,6 @@ async fn get_redis_conn_failure() {
}
#[tokio::test]
-#[allow(clippy::unwrap_used)]
async fn get_redis_conn_success() {
// Arrange
Box::pin(utils::setup()).await;
diff --git a/crates/router/tests/utils.rs b/crates/router/tests/utils.rs
index 20b83f4748..eb369861fc 100644
--- a/crates/router/tests/utils.rs
+++ b/crates/router/tests/utils.rs
@@ -1,5 +1,5 @@
#![allow(
- dead_code,
+ unused,
clippy::expect_used,
clippy::missing_panics_doc,
clippy::unwrap_used
diff --git a/crates/router_env/Cargo.toml b/crates/router_env/Cargo.toml
index 4a8f308e83..90cec730ae 100644
--- a/crates/router_env/Cargo.toml
+++ b/crates/router_env/Cargo.toml
@@ -22,7 +22,7 @@ serde_json = "1.0.140"
serde_path_to_error = "0.1.17"
strum = { version = "0.26.3", features = ["derive"] }
time = { version = "0.3.41", default-features = false, features = ["formatting"] }
-tokio = { version = "1.45.1" }
+tokio = { version = "1.48.0" }
tracing = { workspace = true }
tracing-actix-web = { version = "0.7.18", features = ["opentelemetry_0_27", "uuid_v7"], optional = true }
tracing-appender = { version = "0.2.3" }
@@ -32,7 +32,7 @@ tracing-subscriber = { version = "0.3.19", default-features = true, features = [
vergen = { version = "8.3.2", optional = true, features = ["cargo", "git", "git2", "rustc"] }
[dev-dependencies]
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
[build-dependencies]
cargo_metadata = "0.18.1"
diff --git a/crates/router_env/tests/env.rs b/crates/router_env/tests/env.rs
index cff2ae45f1..8188863aff 100644
--- a/crates/router_env/tests/env.rs
+++ b/crates/router_env/tests/env.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::print_stdout)]
-
#[cfg(feature = "vergen")]
use router_env as env;
diff --git a/crates/router_env/tests/logger.rs b/crates/router_env/tests/logger.rs
index 84831b221a..039a04169d 100644
--- a/crates/router_env/tests/logger.rs
+++ b/crates/router_env/tests/logger.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::unwrap_used)]
-
mod test_module;
use ::config::ConfigError;
@@ -11,6 +9,8 @@ fn logger() -> error_stack::Result<&'static TelemetryGuard, ConfigError> {
use std::sync::OnceLock;
static INSTANCE: OnceLock<TelemetryGuard> = OnceLock::new();
+
+ #[allow(clippy::unwrap_used)]
Ok(INSTANCE.get_or_init(|| {
let config = router_env::Config::new().unwrap();
diff --git a/crates/scheduler/Cargo.toml b/crates/scheduler/Cargo.toml
index 4ca5772a1e..8db32a3071 100644
--- a/crates/scheduler/Cargo.toml
+++ b/crates/scheduler/Cargo.toml
@@ -25,7 +25,7 @@ serde_json = "1.0.140"
strum = { version = "0.26.3", features = ["derive"] }
thiserror = "1.0.69"
time = { version = "0.3.41", features = ["serde", "serde-well-known", "std"] }
-tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }
uuid = { version = "1.17.0", features = ["v4"] }
# First party crates
diff --git a/crates/scheduler/src/consumer.rs b/crates/scheduler/src/consumer.rs
index 99b9df524a..f2d5da4ab9 100644
--- a/crates/scheduler/src/consumer.rs
+++ b/crates/scheduler/src/consumer.rs
@@ -52,7 +52,6 @@ where
// TODO: this can be removed once rand-0.9 is released
// reference - https://github.com/rust-random/rand/issues/1326#issuecomment-1635331942
- #[allow(unknown_lints)]
#[allow(clippy::unnecessary_fallible_conversions)]
let timeout = Uniform::try_from(0..=settings.loop_interval)
.change_context(errors::ProcessTrackerError::ConfigurationError)?;
diff --git a/crates/scheduler/src/producer.rs b/crates/scheduler/src/producer.rs
index 3d28ec91fa..f1e915323f 100644
--- a/crates/scheduler/src/producer.rs
+++ b/crates/scheduler/src/producer.rs
@@ -39,7 +39,6 @@ where
// TODO: this can be removed once rand-0.9 is released
// reference - https://github.com/rust-random/rand/issues/1326#issuecomment-1635331942
- #[allow(unknown_lints)]
#[allow(clippy::unnecessary_fallible_conversions)]
let timeout = Uniform::try_from(0..=scheduler_settings.loop_interval)
.change_context(errors::ProcessTrackerError::ConfigurationError)?;
diff --git a/crates/storage_impl/Cargo.toml b/crates/storage_impl/Cargo.toml
index 8bc23f4dbb..7bf6d83876 100644
--- a/crates/storage_impl/Cargo.toml
+++ b/crates/storage_impl/Cargo.toml
@@ -45,7 +45,7 @@ moka = { version = "0.12", features = ["future"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
thiserror = "1.0.69"
-tokio = { version = "1.45.1", features = ["rt-multi-thread"] }
+tokio = { version = "1.48.0", features = ["rt-multi-thread"] }
[lints]
workspace = true
diff --git a/crates/test_utils/Cargo.toml b/crates/test_utils/Cargo.toml
index 7428e8a18e..65ca60c606 100644
--- a/crates/test_utils/Cargo.toml
+++ b/crates/test_utils/Cargo.toml
@@ -26,7 +26,7 @@ serde_urlencoded = "0.7.1"
serial_test = "3.2.0"
thirtyfour = "0.31.0"
time = { version = "0.3.41", features = ["macros"] }
-tokio = "1.45.1"
+tokio = "1.48.0"
toml = "0.8.22"
# First party crates
diff --git a/crates/test_utils/tests/connectors/selenium.rs b/crates/test_utils/tests/connectors/selenium.rs
index fb2b113867..c7d0c20981 100644
--- a/crates/test_utils/tests/connectors/selenium.rs
+++ b/crates/test_utils/tests/connectors/selenium.rs
@@ -1,10 +1,4 @@
-#![allow(
- clippy::expect_used,
- clippy::panic,
- clippy::unwrap_in_result,
- clippy::missing_panics_doc,
- clippy::unwrap_used
-)]
+#![allow(clippy::expect_used, clippy::unwrap_in_result, clippy::unwrap_used)]
use std::{
collections::{HashMap, HashSet},
env,