diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index d1b8ff4634..2a7f88639e 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -175,6 +175,11 @@ jobs: DATABASE_URL: postgres://postgres:password@localhost:5432/mockable-todos run: cargo run -p sqlx-example-postgres-mockable-todos + - name: Mockable TODOs (Test) + env: + DATABASE_URL: postgres://postgres:password@localhost:5432/mockable-todos + run: cargo test -p sqlx-example-postgres-mockable-todos + - name: Multi-Database (Setup) working-directory: examples/postgres/multi-database env: diff --git a/Cargo.lock b/Cargo.lock index c0ef3b0ca0..6d00782fd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -119,17 +119,6 @@ version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" -[[package]] -name = "argon2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4ce4441f99dbd377ca8a8f57b698c44d0d6e712d8329b5040da5a64aa1ce73" -dependencies = [ - "base64ct", - "blake2", - "password-hash 0.4.2", -] - [[package]] name = "argon2" version = "0.5.3" @@ -139,7 +128,7 @@ dependencies = [ "base64ct", "blake2", "cpufeatures", - "password-hash 0.5.0", + "password-hash", ] [[package]] @@ -158,7 +147,7 @@ dependencies = [ "bstr", "doc-comment", "libc", - "predicates 3.1.3", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -347,62 +336,68 @@ dependencies = [ [[package]] name = "axum" -version = "0.5.17" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" +checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" dependencies = [ - "async-trait", "axum-core", "axum-macros", - "bitflags 1.3.2", "bytes", + "form_urlencoded", "futures-util", "http", "http-body", + "http-body-util", "hyper", + "hyper-util", "itoa", "matchit", "memchr", "mime", "percent-encoding", "pin-project-lite", + "rustversion", "serde", "serde_json", + "serde_path_to_error", "serde_urlencoded", "sync_wrapper", "tokio", "tower", - "tower-http", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.2.9" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" +checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" dependencies = [ - "async-trait", "bytes", - "futures-util", + "futures-core", "http", "http-body", + "http-body-util", "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-macros" -version = "0.2.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6293dae2ec708e679da6736e857cf8532886ef258e92930f38279c12641628b8" +checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" dependencies = [ - "heck 0.4.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.96", ] [[package]] @@ -412,10 +407,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom", + "getrandom 0.2.15", "instant", "pin-project-lite", - "rand", + "rand 0.8.5", "tokio", ] @@ -434,12 +429,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.22.1" @@ -471,7 +460,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.7.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.12.1", @@ -496,15 +485,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" dependencies = [ "serde", ] @@ -729,7 +712,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -808,7 +791,7 @@ version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.96", @@ -864,13 +847,14 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "compact_str" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" dependencies = [ "castaway", "cfg-if", "itoa", + "rustversion", "ryu", "static_assertions", ] @@ -903,6 +887,15 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1027,15 +1020,33 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" -version = "0.27.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.7.0", + "bitflags", "crossterm_winapi", - "libc", - "mio 0.8.11", + "mio", "parking_lot", + "rustix 0.38.43", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix 1.0.7", "signal-hook", "signal-hook-mio", "winapi", @@ -1122,6 +1133,27 @@ dependencies = [ "serde", ] +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "dialoguer" version = "0.11.0" @@ -1168,6 +1200,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "document-features" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +dependencies = [ + "litrs", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -1186,6 +1227,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "either" version = "1.13.0" @@ -1316,15 +1363,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - [[package]] name = "flume" version = "0.11.1" @@ -1519,7 +1557,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1585,12 +1635,6 @@ dependencies = [ "hashbrown 0.15.2", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1638,9 +1682,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -1649,20 +1693,26 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "http-range-header" -version = "0.3.1" +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] [[package]] name = "httparse" @@ -1684,13 +1734,12 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.32" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -1698,11 +1747,24 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "hyper", + "pin-project-lite", "tokio", "tower-service", - "tracing", - "want", ] [[package]] @@ -1852,16 +1914,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -1883,12 +1935,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "indenter" version = "0.3.3" @@ -1914,6 +1960,26 @@ checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "indoc" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" + +[[package]] +name = "instability" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 2.0.96", ] [[package]] @@ -1925,6 +1991,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-uring" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.10.1" @@ -2046,7 +2123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2061,7 +2138,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.7.0", + "bitflags", "libc", "redox_syscall", ] @@ -2096,6 +2173,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.12" @@ -2136,9 +2219,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.5.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -2186,18 +2269,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.0.3" @@ -2205,35 +2276,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] [[package]] name = "mockall" -version = "0.11.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" dependencies = [ "cfg-if", "downcast", "fragile", - "lazy_static", "mockall_derive", - "predicates 2.1.5", + "predicates", "predicates-tree", ] [[package]] name = "mockall_derive" -version = "0.11.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.96", ] [[package]] @@ -2259,7 +2330,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.7.0", + "bitflags", "cfg-if", "cfg_aliases 0.1.1", "libc", @@ -2276,12 +2347,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2314,7 +2379,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "smallvec", "zeroize", ] @@ -2382,7 +2447,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.7.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -2468,18 +2533,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", + "windows-targets", ] [[package]] @@ -2489,7 +2543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2514,26 +2568,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -2642,20 +2676,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "predicates" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" -dependencies = [ - "difflib", - "float-cmp", - "itertools 0.10.5", - "normalize-line-endings", - "predicates-core", - "regex", -] - [[package]] name = "predicates" version = "3.1.3" @@ -2703,27 +2723,25 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.96", ] [[package]] @@ -2764,6 +2782,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "radium" version = "0.7.0" @@ -2777,8 +2801,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -2788,7 +2822,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -2797,7 +2841,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", ] [[package]] @@ -2806,28 +2859,28 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] name = "ratatui" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ - "bitflags 2.7.0", + "bitflags", "cassowary", "compact_str", - "crossterm", + "crossterm 0.28.1", + "indoc", + "instability", "itertools 0.13.0", "lru", "paste", - "stability", "strum", - "strum_macros", "unicode-segmentation", "unicode-truncate", - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] @@ -2856,7 +2909,27 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.7.0", + "bitflags", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", ] [[package]] @@ -2905,7 +2978,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2954,7 +3027,7 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core", + "rand_core 0.6.4", "signature", "spki", "subtle", @@ -2971,7 +3044,7 @@ dependencies = [ "borsh", "bytes", "num-traits", - "rand", + "rand 0.8.5", "rkyv", "serde", "serde_json", @@ -2995,7 +3068,7 @@ version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.7.0", + "bitflags", "errno", "libc", "linux-raw-sys 0.4.15", @@ -3008,7 +3081,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ - "bitflags 2.7.0", + "bitflags", "errno", "libc", "linux-raw-sys 0.9.4", @@ -3093,6 +3166,30 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -3111,7 +3208,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.7.0", + "bitflags", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -3124,7 +3221,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.7.0", + "bitflags", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -3191,6 +3288,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_spanned" version = "0.6.8" @@ -3214,15 +3321,19 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.3" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" dependencies = [ - "base64 0.13.1", + "base64", "chrono", "hex", "indexmap 1.9.3", + "indexmap 2.7.0", + "schemars 0.9.0", + "schemars 1.0.4", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -3230,9 +3341,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" dependencies = [ "darling", "proc-macro2", @@ -3300,7 +3411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", - "mio 0.8.11", + "mio", "signal-hook", ] @@ -3320,7 +3431,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -3389,7 +3500,7 @@ dependencies = [ "hex", "libsqlite3-sys", "paste", - "rand", + "rand 0.8.5", "rand_xoshiro", "serde", "serde_json", @@ -3436,7 +3547,7 @@ version = "0.9.0-alpha.1" dependencies = [ "async-io", "async-std", - "base64 0.22.1", + "base64", "bigdecimal", "bit-vec", "bstr", @@ -3495,10 +3606,11 @@ name = "sqlx-example-postgres-axum-social" version = "0.1.0" dependencies = [ "anyhow", - "argon2 0.4.1", + "argon2", "axum", "dotenvy", - "rand", + "http-body-util", + "rand 0.9.1", "regex", "serde", "serde_json", @@ -3517,11 +3629,11 @@ dependencies = [ name = "sqlx-example-postgres-chat" version = "0.1.0" dependencies = [ - "crossterm", + "crossterm 0.29.0", "ratatui", "sqlx", "tokio", - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] @@ -3575,7 +3687,7 @@ version = "0.9.0-alpha.1" dependencies = [ "color-eyre", "dotenvy", - "rand", + "rand 0.9.1", "rust_decimal", "sqlx", "sqlx-example-postgres-multi-database-accounts", @@ -3588,12 +3700,12 @@ dependencies = [ name = "sqlx-example-postgres-multi-database-accounts" version = "0.1.0" dependencies = [ - "argon2 0.5.3", - "password-hash 0.5.0", - "rand", + "argon2", + "password-hash", + "rand 0.9.1", "serde", "sqlx", - "thiserror 1.0.69", + "thiserror 2.0.11", "time", "tokio", "uuid", @@ -3616,7 +3728,7 @@ version = "0.9.0-alpha.1" dependencies = [ "color-eyre", "dotenvy", - "rand", + "rand 0.9.1", "rust_decimal", "sqlx", "sqlx-example-postgres-multi-tenant-accounts", @@ -3629,12 +3741,12 @@ dependencies = [ name = "sqlx-example-postgres-multi-tenant-accounts" version = "0.1.0" dependencies = [ - "argon2 0.5.3", - "password-hash 0.5.0", - "rand", + "argon2", + "password-hash", + "rand 0.9.1", "serde", "sqlx", - "thiserror 1.0.69", + "thiserror 2.0.11", "time", "tokio", "uuid", @@ -3742,7 +3854,7 @@ dependencies = [ "async-std", "dotenvy", "either", - "heck 0.5.0", + "heck", "hex", "proc-macro2", "quote", @@ -3763,9 +3875,9 @@ name = "sqlx-mysql" version = "0.9.0-alpha.1" dependencies = [ "atoi", - "base64 0.22.1", + "base64", "bigdecimal", - "bitflags 2.7.0", + "bitflags", "byteorder", "bytes", "chrono", @@ -3786,7 +3898,7 @@ dependencies = [ "md-5", "memchr", "percent-encoding", - "rand", + "rand 0.8.5", "rsa", "rust_decimal", "serde", @@ -3808,10 +3920,10 @@ name = "sqlx-postgres" version = "0.9.0-alpha.1" dependencies = [ "atoi", - "base64 0.22.1", + "base64", "bigdecimal", "bit-vec", - "bitflags 2.7.0", + "bitflags", "byteorder", "chrono", "crc", @@ -3832,7 +3944,7 @@ dependencies = [ "md-5", "memchr", "num-bigint", - "rand", + "rand 0.8.5", "rust_decimal", "serde", "serde_json", @@ -3885,16 +3997,6 @@ dependencies = [ "sqlx", ] -[[package]] -name = "stability" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" -dependencies = [ - "quote", - "syn 2.0.96", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3939,7 +4041,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -4054,9 +4156,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] name = "synstructure" @@ -4089,7 +4191,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.2.15", "once_cell", "rustix 0.38.43", "windows-sys 0.59.0", @@ -4238,17 +4340,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.43.0" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", - "mio 1.0.3", + "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", + "slab", "socket2", "tokio-macros", "windows-sys 0.52.0", @@ -4312,39 +4416,20 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", "tracing", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.3" @@ -4425,12 +4510,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "trybuild" version = "1.0.101" @@ -4527,7 +4606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna", "percent-encoding", ] @@ -4560,12 +4639,12 @@ dependencies = [ [[package]] name = "validator" -version = "0.16.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +checksum = "43fb22e1a008ece370ce08a3e9e4447a910e92621bb49b85d6e48a45397e7cfa" dependencies = [ - "idna 0.4.0", - "lazy_static", + "idna", + "once_cell", "regex", "serde", "serde_derive", @@ -4576,28 +4655,16 @@ dependencies = [ [[package]] name = "validator_derive" -version = "0.16.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +checksum = "b7df16e474ef958526d1205f6dda359fdfab79d9aa6d54bafcb92dcd07673dca" dependencies = [ - "if_chain", - "lazy_static", - "proc-macro-error", + "darling", + "once_cell", + "proc-macro-error2", "proc-macro2", "quote", - "regex", - "syn 1.0.109", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" -dependencies = [ - "proc-macro2", - "syn 1.0.109", + "syn 2.0.96", ] [[package]] @@ -4674,19 +4741,19 @@ dependencies = [ ] [[package]] -name = "want" -version = "0.3.1" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] [[package]] name = "wasite" @@ -4839,16 +4906,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -4857,7 +4915,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4866,22 +4924,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -4890,46 +4933,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "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", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -4942,48 +4967,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4999,6 +5000,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + [[package]] name = "write16" version = "1.0.0" diff --git a/examples/postgres/axum-social-with-tests/Cargo.toml b/examples/postgres/axum-social-with-tests/Cargo.toml index 05257a617c..476d77bd1a 100644 --- a/examples/postgres/axum-social-with-tests/Cargo.toml +++ b/examples/postgres/axum-social-with-tests/Cargo.toml @@ -7,19 +7,19 @@ edition = "2021" [dependencies] # Primary crates -axum = { version = "0.5.13", features = ["macros"] } +axum = { version = "0.8.4", features = ["macros"] } sqlx = { path = "../../../", features = [ "runtime-tokio", "tls-rustls-ring", "postgres", "time", "uuid" ] } tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] } # Important secondary crates -argon2 = "0.4.1" -rand = "0.8.5" +argon2 = "0.5.3" +rand = "0.9.1" regex = "1.6.0" serde = "1.0.140" -serde_with = { version = "2.0.0", features = ["time_0_3"] } +serde_with = { version = "3.14.0", features = ["time_0_3"] } time = "0.3.11" uuid = { version = "1.1.2", features = ["serde"] } -validator = { version = "0.16.0", features = ["derive"] } +validator = { version = "0.20.0", features = ["derive"] } # Auxilliary crates anyhow = "1.0.58" @@ -29,4 +29,5 @@ tracing = "0.1.35" [dev-dependencies] serde_json = "1.0.82" -tower = "0.4.13" +tower = "0.5.2" +http-body-util = "0.1.3" diff --git a/examples/postgres/axum-social-with-tests/src/http/mod.rs b/examples/postgres/axum-social-with-tests/src/http/mod.rs index a871a93d7e..2edcafc35b 100644 --- a/examples/postgres/axum-social-with-tests/src/http/mod.rs +++ b/examples/postgres/axum-social-with-tests/src/http/mod.rs @@ -1,6 +1,7 @@ use anyhow::Context; -use axum::{Extension, Router}; +use axum::{extract::FromRef, Router}; use sqlx::PgPool; +use tokio::net::TcpListener; mod error; @@ -11,16 +12,21 @@ pub use self::error::Error; pub type Result = ::std::result::Result; +#[derive(Clone, FromRef)] +pub struct AppState { + db: PgPool, +} + pub fn app(db: PgPool) -> Router { Router::new() .merge(user::router()) .merge(post::router()) - .layer(Extension(db)) + .with_state(AppState { db }) } pub async fn serve(db: PgPool) -> anyhow::Result<()> { - axum::Server::bind(&"0.0.0.0:8080".parse().unwrap()) - .serve(app(db).into_make_service()) + let listener = TcpListener::bind("0.0.0.0:8080").await?; + axum::serve(listener, app(db)) .await .context("failed to serve API") } diff --git a/examples/postgres/axum-social-with-tests/src/http/post/comment.rs b/examples/postgres/axum-social-with-tests/src/http/post/comment.rs index 630dedaa21..c63a9ad289 100644 --- a/examples/postgres/axum-social-with-tests/src/http/post/comment.rs +++ b/examples/postgres/axum-social-with-tests/src/http/post/comment.rs @@ -1,5 +1,5 @@ -use axum::extract::Path; -use axum::{Extension, Json, Router}; +use axum::extract::{Path, State}; +use axum::{Json, Router}; use axum::routing::get; @@ -10,14 +10,14 @@ use crate::http::user::UserAuth; use sqlx::PgPool; use validator::Validate; -use crate::http::Result; +use crate::http::{AppState, Result}; use time::format_description::well_known::Rfc3339; use uuid::Uuid; -pub fn router() -> Router { +pub fn router() -> Router { Router::new().route( - "/v1/post/:postId/comment", + "/v1/post/{postId}/comment", get(get_post_comments).post(create_post_comment), ) } @@ -44,7 +44,7 @@ struct Comment { // #[axum::debug_handler] // very useful! async fn create_post_comment( - db: Extension, + db: State, Path(post_id): Path, Json(req): Json, ) -> Result> { @@ -76,7 +76,7 @@ async fn create_post_comment( /// Returns comments in ascending chronological order. async fn get_post_comments( - db: Extension, + db: State, Path(post_id): Path, ) -> Result>> { // Note: normally you'd want to put a `LIMIT` on this as well, diff --git a/examples/postgres/axum-social-with-tests/src/http/post/mod.rs b/examples/postgres/axum-social-with-tests/src/http/post/mod.rs index 09c2fa44bb..44bb3c21fc 100644 --- a/examples/postgres/axum-social-with-tests/src/http/post/mod.rs +++ b/examples/postgres/axum-social-with-tests/src/http/post/mod.rs @@ -1,4 +1,5 @@ -use axum::{Extension, Json, Router}; +use axum::extract::State; +use axum::{Json, Router}; use axum::routing::get; @@ -14,9 +15,11 @@ use crate::http::Result; use time::format_description::well_known::Rfc3339; use uuid::Uuid; +use super::AppState; + mod comment; -pub fn router() -> Router { +pub fn router() -> Router { Router::new() .route("/v1/post", get(get_posts).post(create_post)) .merge(comment::router()) @@ -43,10 +46,7 @@ struct Post { } // #[axum::debug_handler] // very useful! -async fn create_post( - db: Extension, - Json(req): Json, -) -> Result> { +async fn create_post(db: State, Json(req): Json) -> Result> { req.validate()?; let user_id = req.auth.verify(&*db).await?; @@ -73,7 +73,7 @@ async fn create_post( } /// Returns posts in descending chronological order. -async fn get_posts(db: Extension) -> Result>> { +async fn get_posts(db: State) -> Result>> { // Note: normally you'd want to put a `LIMIT` on this as well, // though that would also necessitate implementing pagination. let posts = sqlx::query_as!( diff --git a/examples/postgres/axum-social-with-tests/src/http/user.rs b/examples/postgres/axum-social-with-tests/src/http/user.rs index cf4db77cdc..71c9c5af52 100644 --- a/examples/postgres/axum-social-with-tests/src/http/user.rs +++ b/examples/postgres/axum-social-with-tests/src/http/user.rs @@ -1,5 +1,6 @@ +use axum::extract::State; use axum::http::StatusCode; -use axum::{routing::post, Extension, Json, Router}; +use axum::{routing::post, Json, Router}; use rand::Rng; use regex::Regex; use std::{sync::LazyLock, time::Duration}; @@ -11,9 +12,11 @@ use validator::Validate; use crate::http::{Error, Result}; +use super::AppState; + pub type UserId = Uuid; -pub fn router() -> Router { +pub fn router() -> Router { Router::new().route("/v1/user", post(create_user)) } @@ -24,7 +27,7 @@ static USERNAME_REGEX: LazyLock = LazyLock::new(|| Regex::new(r"^[0-9A-Za #[derive(Deserialize, Validate)] #[serde(rename_all = "camelCase")] pub struct UserAuth { - #[validate(length(min = 3, max = 16), regex = "USERNAME_REGEX")] + #[validate(length(min = 3, max = 16), regex(path = USERNAME_REGEX))] username: String, #[validate(length(min = 8, max = 32))] password: String, @@ -32,7 +35,7 @@ pub struct UserAuth { // WARNING: this API has none of the checks that a normal user signup flow implements, // such as email or phone verification. -async fn create_user(db: Extension, Json(req): Json) -> Result { +async fn create_user(db: State, Json(req): Json) -> Result { req.validate()?; let UserAuth { username, password } = req; @@ -84,7 +87,7 @@ impl UserAuth { // Sleep a random amount of time to avoid leaking existence of a user in timing. let sleep_duration = - rand::thread_rng().gen_range(Duration::from_millis(100)..=Duration::from_millis(500)); + rand::rng().random_range(Duration::from_millis(100)..=Duration::from_millis(500)); tokio::time::sleep(sleep_duration).await; Err(Error::UnprocessableEntity( diff --git a/examples/postgres/axum-social-with-tests/src/password.rs b/examples/postgres/axum-social-with-tests/src/password.rs index 44f1551f85..cdd0502c16 100644 --- a/examples/postgres/axum-social-with-tests/src/password.rs +++ b/examples/postgres/axum-social-with-tests/src/password.rs @@ -1,12 +1,18 @@ use anyhow::{anyhow, Context}; use tokio::task; -use argon2::password_hash::SaltString; +use argon2::password_hash::{Salt, SaltString}; use argon2::{password_hash, Argon2, PasswordHash, PasswordHasher, PasswordVerifier}; pub async fn hash(password: String) -> anyhow::Result { task::spawn_blocking(move || { - let salt = SaltString::generate(rand::thread_rng()); + // `SaltString::generate()` is only compatible with `rand 0.6`, which is very out-of-date now. + // This shows how to generate a salt using nearly any `rand` version. + let salt: [u8; Salt::RECOMMENDED_LENGTH] = rand::random(); + + let salt = SaltString::encode_b64(&salt) + .expect("should not fail; we generated a salt of recommended length"); + Ok(Argon2::default() .hash_password(password.as_bytes(), &salt) .map_err(|e| anyhow!(e).context("failed to hash password"))? diff --git a/examples/postgres/axum-social-with-tests/tests/common.rs b/examples/postgres/axum-social-with-tests/tests/common.rs index 2b7f169ae9..64da67091f 100644 --- a/examples/postgres/axum-social-with-tests/tests/common.rs +++ b/examples/postgres/axum-social-with-tests/tests/common.rs @@ -1,10 +1,11 @@ // This is imported by different tests that use different functions. #![allow(dead_code)] -use axum::body::{Body, BoxBody, HttpBody}; +use axum::body::Body; use axum::http::header::CONTENT_TYPE; use axum::http::{request, Request}; use axum::response::Response; +use http_body_util::BodyExt; use time::format_description::well_known::Rfc3339; use time::OffsetDateTime; use uuid::Uuid; @@ -27,7 +28,7 @@ impl RequestBuilderExt for request::Builder { } } -pub async fn response_json(resp: &mut Response) -> serde_json::Value { +pub async fn response_json(resp: &mut Response) -> serde_json::Value { assert_eq!( resp.headers() .get(CONTENT_TYPE) @@ -35,15 +36,11 @@ pub async fn response_json(resp: &mut Response) -> serde_json::Value { "application/json" ); - let body = resp.body_mut(); - - let mut bytes = Vec::new(); - - while let Some(res) = body.data().await { - let chunk = res.expect("error reading response body"); - - bytes.extend_from_slice(&chunk[..]); - } + let bytes = resp + .collect() + .await + .expect("error reading response body") + .to_bytes(); serde_json::from_slice(&bytes).expect("failed to read response body as json") } diff --git a/examples/postgres/chat/Cargo.toml b/examples/postgres/chat/Cargo.toml index ecacff7269..f28be88eb7 100644 --- a/examples/postgres/chat/Cargo.toml +++ b/examples/postgres/chat/Cargo.toml @@ -7,6 +7,6 @@ workspace = "../../../" [dependencies] sqlx = { path = "../../../", features = [ "postgres", "runtime-tokio", "tls-native-tls" ] } tokio = { version = "1.20.0", features = [ "rt-multi-thread", "macros" ] } -ratatui = "0.27.0" -crossterm = "0.27.0" -unicode-width = "0.1" +ratatui = "0.29.0" +crossterm = "0.29.0" +unicode-width = "0.2.0" diff --git a/examples/postgres/chat/README.md b/examples/postgres/chat/README.md index 384fa28860..1928b5cb93 100644 --- a/examples/postgres/chat/README.md +++ b/examples/postgres/chat/README.md @@ -20,5 +20,5 @@ This example demonstrates how to use PostgreSQL channels to create a very simple Run the project ``` -cargo run -p sqlx-examples-postgres-chat +cargo run -p sqlx-example-postgres-chat ``` diff --git a/examples/postgres/chat/src/main.rs b/examples/postgres/chat/src/main.rs index 3b6ab48619..a879c4cb63 100644 --- a/examples/postgres/chat/src/main.rs +++ b/examples/postgres/chat/src/main.rs @@ -98,7 +98,7 @@ impl ChatApp { ] .as_ref(), ) - .split(frame.size()); + .split(frame.area()); let text = Text::from(Line::from(vec![ Span::raw("Press "), @@ -114,12 +114,12 @@ impl ChatApp { .style(Style::default().fg(Color::Yellow)) .block(Block::default().borders(Borders::ALL).title("Input")); frame.render_widget(input, chunks[1]); - frame.set_cursor( + frame.set_cursor_position(( // Put cursor past the end of the input text chunks[1].x + self.input.width() as u16 + 1, // Move one line down, from the border to the input line chunks[1].y + 1, - ); + )); let messages = List::new(messages).block(Block::default().borders(Borders::ALL).title("Messages")); diff --git a/examples/postgres/mockable-todos/Cargo.toml b/examples/postgres/mockable-todos/Cargo.toml index 59bb800224..2c9d9746c7 100644 --- a/examples/postgres/mockable-todos/Cargo.toml +++ b/examples/postgres/mockable-todos/Cargo.toml @@ -11,4 +11,4 @@ clap = { version = "4", features = ["derive"] } tokio = { version = "1.20.0", features = ["rt", "macros"]} dotenvy = "0.15.0" async-trait = "0.1.41" -mockall = "0.11" +mockall = "0.13" diff --git a/examples/postgres/mockable-todos/src/main.rs b/examples/postgres/mockable-todos/src/main.rs index 6f3e34692a..6f593e948f 100644 --- a/examples/postgres/mockable-todos/src/main.rs +++ b/examples/postgres/mockable-todos/src/main.rs @@ -140,7 +140,7 @@ mod tests { use super::*; use mockall::predicate::*; - #[async_std::test] + #[tokio::test] async fn test_mocked_add() { let description = String::from("My todo"); let args = Args { diff --git a/examples/postgres/multi-database/Cargo.toml b/examples/postgres/multi-database/Cargo.toml index c5e01621b8..4844a1facd 100644 --- a/examples/postgres/multi-database/Cargo.toml +++ b/examples/postgres/multi-database/Cargo.toml @@ -17,7 +17,7 @@ tracing-subscriber = "0.3.19" rust_decimal = "1.36.0" -rand = "0.8.5" +rand = "0.9.1" [dependencies.sqlx] # version = "0.9.0" diff --git a/examples/postgres/multi-database/accounts/Cargo.toml b/examples/postgres/multi-database/accounts/Cargo.toml index f7c04ca8b4..b94494cebb 100644 --- a/examples/postgres/multi-database/accounts/Cargo.toml +++ b/examples/postgres/multi-database/accounts/Cargo.toml @@ -7,12 +7,12 @@ edition = "2021" sqlx = { workspace = true, features = ["postgres", "time", "uuid", "macros", "sqlx-toml"] } tokio = { version = "1", features = ["rt", "sync"] } -argon2 = { version = "0.5.3", features = ["password-hash"] } +argon2 = "0.5.3" password-hash = { version = "0.5", features = ["std"] } uuid = { version = "1", features = ["serde"] } -thiserror = "1" -rand = "0.8" +thiserror = "2" +rand = "0.9.1" time = { version = "0.3.37", features = ["serde"] } diff --git a/examples/postgres/multi-database/accounts/src/lib.rs b/examples/postgres/multi-database/accounts/src/lib.rs index a543d2fd45..7977ac8199 100644 --- a/examples/postgres/multi-database/accounts/src/lib.rs +++ b/examples/postgres/multi-database/accounts/src/lib.rs @@ -1,6 +1,6 @@ use argon2::{password_hash, Argon2, PasswordHasher, PasswordVerifier}; -use password_hash::PasswordHashString; -use rand::distributions::{Alphanumeric, DistString}; +use password_hash::{PasswordHashString, Salt, SaltString}; +use rand::distr::{Alphanumeric, SampleString}; use sqlx::PgPool; use std::sync::Arc; use uuid::Uuid; @@ -141,7 +141,12 @@ impl AccountsManager { // We transfer ownership to the blocking task and back to ensure Tokio doesn't spawn // excess threads. let (_guard, res) = tokio::task::spawn_blocking(move || { - let salt = password_hash::SaltString::generate(rand::thread_rng()); + // `SaltString::generate()` is only compatible with `rand 0.6`, which is very out-of-date now. + // This shows how to generate a salt using nearly any `rand` version. + let salt: [u8; Salt::RECOMMENDED_LENGTH] = rand::random(); + + let salt = SaltString::encode_b64(&salt) + .expect("should not fail; we generated a salt of recommended length"); ( guard, Argon2::default() @@ -288,6 +293,6 @@ impl SessionToken { const LEN: usize = 32; fn generate() -> Self { - SessionToken(Alphanumeric.sample_string(&mut rand::thread_rng(), Self::LEN)) + SessionToken(Alphanumeric.sample_string(&mut rand::rng(), Self::LEN)) } } diff --git a/examples/postgres/multi-database/payments/src/lib.rs b/examples/postgres/multi-database/payments/src/lib.rs index 356d173a5f..c6b1c22f4a 100644 --- a/examples/postgres/multi-database/payments/src/lib.rs +++ b/examples/postgres/multi-database/payments/src/lib.rs @@ -1,6 +1,6 @@ -use accounts::{AccountId, AccountsManager}; +use accounts::AccountId; use sqlx::postgres::{PgConnectOptions, PgPoolOptions}; -use sqlx::{Acquire, PgConnection, PgPool, Postgres}; +use sqlx::PgPool; use time::OffsetDateTime; use uuid::Uuid; diff --git a/examples/postgres/multi-database/src/main.rs b/examples/postgres/multi-database/src/main.rs index 263eff8e50..b7482c881c 100644 --- a/examples/postgres/multi-database/src/main.rs +++ b/examples/postgres/multi-database/src/main.rs @@ -2,7 +2,7 @@ use accounts::AccountsManager; use color_eyre::eyre; use color_eyre::eyre::{Context, OptionExt}; use payments::PaymentsManager; -use rand::distributions::{Alphanumeric, DistString}; +use rand::distr::{Alphanumeric, SampleString}; use sqlx::Connection; #[tokio::main] @@ -42,11 +42,11 @@ async fn main() -> eyre::Result<()> { // POST /account let user_email = format!("user{}@example.com", rand::random::()); - let user_password = Alphanumeric.sample_string(&mut rand::thread_rng(), 16); + let user_password = Alphanumeric.sample_string(&mut rand::rng(), 16); // Requires an externally managed transaction in case any application-specific records // should be created after the actual account record. - let mut txn = conn.begin().await?; + let txn = conn.begin().await?; let account_id = accounts // Takes ownership of the password string because it's sent to another thread for hashing. diff --git a/examples/postgres/multi-tenant/Cargo.toml b/examples/postgres/multi-tenant/Cargo.toml index a219cce2b8..df50e05de8 100644 --- a/examples/postgres/multi-tenant/Cargo.toml +++ b/examples/postgres/multi-tenant/Cargo.toml @@ -17,7 +17,7 @@ tracing-subscriber = "0.3.19" rust_decimal = "1.36.0" -rand = "0.8.5" +rand = "0.9.1" [dependencies.sqlx] # version = "0.9.0" diff --git a/examples/postgres/multi-tenant/accounts/Cargo.toml b/examples/postgres/multi-tenant/accounts/Cargo.toml index 40c365c607..db65294998 100644 --- a/examples/postgres/multi-tenant/accounts/Cargo.toml +++ b/examples/postgres/multi-tenant/accounts/Cargo.toml @@ -10,8 +10,8 @@ argon2 = { version = "0.5.3", features = ["password-hash"] } password-hash = { version = "0.5", features = ["std"] } uuid = { version = "1", features = ["serde"] } -thiserror = "1" -rand = "0.8" +thiserror = "2" +rand = "0.9.1" time = { version = "0.3.37", features = ["serde"] } diff --git a/examples/postgres/multi-tenant/accounts/src/lib.rs b/examples/postgres/multi-tenant/accounts/src/lib.rs index ad33735165..76b1a14e3b 100644 --- a/examples/postgres/multi-tenant/accounts/src/lib.rs +++ b/examples/postgres/multi-tenant/accounts/src/lib.rs @@ -1,6 +1,6 @@ use argon2::{password_hash, Argon2, PasswordHasher, PasswordVerifier}; -use password_hash::PasswordHashString; -use rand::distributions::{Alphanumeric, DistString}; +use password_hash::{PasswordHashString, Salt, SaltString}; +use rand::distr::{Alphanumeric, SampleString}; use sqlx::{Acquire, Executor, PgTransaction, Postgres}; use std::sync::Arc; use uuid::Uuid; @@ -129,7 +129,13 @@ impl AccountsManager { // We transfer ownership to the blocking task and back to ensure Tokio doesn't spawn // excess threads. let (_guard, res) = tokio::task::spawn_blocking(move || { - let salt = password_hash::SaltString::generate(rand::thread_rng()); + // `SaltString::generate()` is only compatible with `rand 0.6`, which is very out-of-date now. + // This shows how to generate a salt using nearly any `rand` version. + let salt: [u8; Salt::RECOMMENDED_LENGTH] = rand::random(); + + let salt = SaltString::encode_b64(&salt) + .expect("should not fail; we generated a salt of recommended length"); + ( guard, Argon2::default() @@ -279,6 +285,6 @@ impl SessionToken { const LEN: usize = 32; fn generate() -> Self { - SessionToken(Alphanumeric.sample_string(&mut rand::thread_rng(), Self::LEN)) + SessionToken(Alphanumeric.sample_string(&mut rand::rng(), Self::LEN)) } } diff --git a/examples/postgres/multi-tenant/src/main.rs b/examples/postgres/multi-tenant/src/main.rs index 94a96fcf2b..fa3f9101a8 100644 --- a/examples/postgres/multi-tenant/src/main.rs +++ b/examples/postgres/multi-tenant/src/main.rs @@ -1,7 +1,7 @@ use accounts::AccountsManager; use color_eyre::eyre; use color_eyre::eyre::{Context, OptionExt}; -use rand::distributions::{Alphanumeric, DistString}; +use rand::distr::{Alphanumeric, SampleString}; use sqlx::Connection; #[tokio::main] @@ -31,7 +31,7 @@ async fn main() -> eyre::Result<()> { // POST /account let user_email = format!("user{}@example.com", rand::random::()); - let user_password = Alphanumeric.sample_string(&mut rand::thread_rng(), 16); + let user_password = Alphanumeric.sample_string(&mut rand::rng(), 16); // Requires an externally managed transaction in case any application-specific records // should be created after the actual account record.