From 819af629039f8968ad6e45b7d219eddb5c10a4ce Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 11 Mar 2024 16:20:11 +0100 Subject: [PATCH] chore: bumb dependencies Signed-off-by: Robin Appelman --- Cargo.lock | 418 ++++++++++++++++++++++------------------- Cargo.toml | 10 +- src/redis.rs | 18 +- test_client/Cargo.toml | 2 +- tests/integration.rs | 4 +- 5 files changed, 239 insertions(+), 213 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60d5922a..4a8e1512 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,6 +117,46 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -265,9 +305,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byteorder" @@ -283,9 +323,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -322,9 +362,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ "clap_builder", "clap_derive", @@ -332,9 +372,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -586,6 +626,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "event-listener" version = "3.1.0" @@ -597,6 +643,15 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "finl_unicode" version = "1.2.0" @@ -714,6 +769,21 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -737,6 +807,18 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +[[package]] +name = "futures-time" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6404853a6824881fe5f7d662d147dc4e84ecd2259ba0378f272a71dab600758a" +dependencies = [ + "async-channel", + "async-io", + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-util" version = "0.3.30" @@ -978,7 +1060,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -1042,6 +1124,26 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -1132,6 +1234,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -1156,25 +1264,35 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "logos" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8b031682c67a8e3d5446840f9573eb7fe26efe7ec8d195c9ac4c0647c502f1" +checksum = "161971eb88a0da7ae0c333e1063467c5b5727e7fb6b710b8db4814eade3a42e8" dependencies = [ "logos-derive", ] [[package]] -name = "logos-derive" -version = "0.12.1" +name = "logos-codegen" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d849148dbaf9661a6151d1ca82b13bb4c4c128146a88d05253b38d4e2f496c" +checksum = "8e31badd9de5131fdf4921f6473d457e3dd85b11b7f091ceb50e4df7c3eeb12a" dependencies = [ "beef", "fnv", + "lazy_static", "proc-macro2", "quote", - "regex-syntax 0.6.29", - "syn 1.0.109", + "regex-syntax 0.8.2", + "syn 2.0.52", +] + +[[package]] +name = "logos-derive" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c2a69b3eb68d5bd595107c9ee58d7e07fe2bb5e360cc85b0f084dedac80de0a" +dependencies = [ + "logos-codegen", ] [[package]] @@ -1204,39 +1322,19 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "miette" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" -dependencies = [ - "backtrace", - "backtrace-ext", - "is-terminal", - "miette-derive 5.10.0", - "once_cell", - "owo-colors 3.5.0", - "supports-color 2.1.0", - "supports-hyperlinks 2.1.0", - "supports-unicode 2.1.0", - "terminal_size 0.1.17", - "textwrap 0.15.2", - "thiserror", - "unicode-width", -] - -[[package]] -name = "miette" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baed61d13cc3723ee6dbed730a82bfacedc60a85d81da2d77e9c3e8ebc0b504a" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ "backtrace", "backtrace-ext", - "miette-derive 7.1.0", - "owo-colors 4.0.0", - "supports-color 3.0.0", - "supports-hyperlinks 3.0.0", - "supports-unicode 3.0.0", - "terminal_size 0.3.0", + "cfg-if", + "miette-derive", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", "textwrap 0.16.1", "thiserror", "unicode-width", @@ -1244,20 +1342,9 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "miette-derive" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301c3f54f98abc6c212ee722f5e5c62e472a334415840669e356f04850051ec" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", @@ -1343,13 +1430,13 @@ dependencies = [ [[package]] name = "nextcloud-config-parser" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c0aa2e8a655af8fb9da3ff1dcb03fcfae04e36537e320386b0066c68d976bf" +checksum = "fc55276e6e9382f96902cb575b60e84511e7d3b7309c4760fc370191bac104c3" dependencies = [ "form_urlencoded", "futures-core", - "miette 5.10.0", + "miette", "php-literal-parser", "redis", "thiserror", @@ -1382,7 +1469,7 @@ name = "notify_push" version = "0.1.0" dependencies = [ "ahash", - "clap 4.5.1", + "clap 4.5.2", "dashmap", "derivative", "dotenvy", @@ -1390,12 +1477,12 @@ dependencies = [ "futures", "http-auth-basic", "log", - "miette 5.10.0", + "miette", "mini-redis", "nextcloud-config-parser", "nextcloud_appinfo", "once_cell", - "parse-display 0.9.0", + "parse-display", "percent-encoding", "rand", "redis", @@ -1512,12 +1599,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - [[package]] name = "owo-colors" version = "4.0.0" @@ -1553,43 +1634,17 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "parse-display" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6509d08722b53e8dafe97f2027b22ccbe3a5db83cb352931e9716b0aa44bc5c" -dependencies = [ - "once_cell", - "parse-display-derive 0.8.2", - "regex", -] - [[package]] name = "parse-display" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06af5f9333eb47bd9ba8462d612e37a8328a5cb80b13f0af4de4c3b89f52dee5" dependencies = [ - "parse-display-derive 0.9.0", + "parse-display-derive", "regex", "regex-syntax 0.8.2", ] -[[package]] -name = "parse-display-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68517892c8daf78da08c0db777fcc17e07f2f63ef70041718f8a7630ad84f341" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "regex", - "regex-syntax 0.7.5", - "structmeta 0.2.0", - "syn 2.0.52", -] - [[package]] name = "parse-display-derive" version = "0.9.0" @@ -1600,7 +1655,7 @@ dependencies = [ "quote", "regex", "regex-syntax 0.8.2", - "structmeta 0.3.0", + "structmeta", "syn 2.0.52", ] @@ -1633,14 +1688,14 @@ checksum = "f658886ed52e196e850cfbbfddab9eaa7f6d90dd0929e264c31e5cec07e09e57" [[package]] name = "php-literal-parser" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae9b58aaf3fdcc2970e0c98e9ff8c5865cfd2c165371007d0a7771dc79c3d93" +checksum = "b3c890e0301d38f0cdddc26fec42b5f7768e0e18b931c2b7a0073ddea3cf5621" dependencies = [ "logos", "memchr", - "miette 5.10.0", - "parse-display 0.8.2", + "miette", + "parse-display", "serde", "thiserror", ] @@ -1704,6 +1759,22 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1790,15 +1861,16 @@ dependencies = [ [[package]] name = "redis" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c580d9cbbe1d1b479e8d67cf9daf6a62c957e6846048408b80b43ac3f6af84cd" +checksum = "3268dab7fe8f1d136b3c4367bc230383dc2c357f8e305ee898fa3beacddaf00d" dependencies = [ "async-trait", "bytes", "combine", "crc16", "futures", + "futures-time", "futures-util", "itoa", "log", @@ -1869,12 +1941,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -1883,9 +1949,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "0eea5a9eb898d3783f17c6407670e3592fd174cb81a10e51d4c37f49450b9946" dependencies = [ "base64 0.21.7", "bytes", @@ -1972,6 +2038,20 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + [[package]] name = "rustix" version = "0.38.31" @@ -1981,7 +2061,7 @@ dependencies = [ "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -2207,6 +2287,16 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "socket2" version = "0.5.6" @@ -2271,7 +2361,7 @@ dependencies = [ "dirs", "dotenvy", "either", - "event-listener", + "event-listener 3.1.0", "flume", "futures-channel", "futures-core", @@ -2375,18 +2465,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" -[[package]] -name = "structmeta" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" -dependencies = [ - "proc-macro2", - "quote", - "structmeta-derive 0.2.0", - "syn 2.0.52", -] - [[package]] name = "structmeta" version = "0.3.0" @@ -2395,18 +2473,7 @@ checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" dependencies = [ "proc-macro2", "quote", - "structmeta-derive 0.3.0", - "syn 2.0.52", -] - -[[package]] -name = "structmeta-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" -dependencies = [ - "proc-macro2", - "quote", + "structmeta-derive", "syn 2.0.52", ] @@ -2451,16 +2518,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "supports-color" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" -dependencies = [ - "is-terminal", - "is_ci", -] - [[package]] name = "supports-color" version = "3.0.0" @@ -2470,30 +2527,12 @@ dependencies = [ "is_ci", ] -[[package]] -name = "supports-hyperlinks" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" -dependencies = [ - "is-terminal", -] - [[package]] name = "supports-hyperlinks" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0a1e5168041f5f3ff68ff7d95dcb9c8749df29f6e7e89ada40dd4c9de404ee" -[[package]] -name = "supports-unicode" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" -dependencies = [ - "is-terminal", -] - [[package]] name = "supports-unicode" version = "3.0.0" @@ -2551,42 +2590,32 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "terminal_size" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix", + "rustix 0.38.31", "windows-sys 0.48.0", ] @@ -2597,7 +2626,7 @@ dependencies = [ "base64 0.22.0", "flexi_logger", "log", - "miette 7.1.0", + "miette", "serde_json", "tungstenite 0.21.0", "ureq", @@ -2613,17 +2642,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "textwrap" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - [[package]] name = "textwrap" version = "0.16.1" @@ -2694,7 +2712,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -3059,6 +3077,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + [[package]] name = "want" version = "0.3.1" @@ -3215,9 +3239,9 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" dependencies = [ "redox_syscall", "wasite", diff --git a/Cargo.toml b/Cargo.toml index fb564abe..4f5d00bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" rust-version = "1.74.0" [dependencies] -redis = { version = "0.24.0", default-features = false, features = ["tokio-comp", "aio", "cluster", "cluster-async"] } +redis = { version = "0.25.0", default-features = false, features = ["tokio-comp", "aio", "cluster", "cluster-async"] } serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.114" thiserror = "1.0.57" @@ -18,9 +18,9 @@ sqlx-oldapi = { version = "0.6.19", features = ["runtime-tokio-rustls", "any", " dotenvy = "0.15.7" dashmap = "5.5.3" once_cell = "1.19.0" -miette = { version = "5.10.0", features = ["fancy"] } +miette = { version = "7.2.0", features = ["fancy"] } smallvec = { version = "1.13.1", features = ["serde"] } -reqwest = { version = "0.11.24", default-features = false, features = ["rustls-tls", "json"] } +reqwest = { version = "0.11.25", default-features = false, features = ["rustls-tls", "json"] } warp-real-ip = "0.2.0" parse-display = "0.9.0" percent-encoding = "2.3.1" @@ -29,9 +29,9 @@ ahash = "0.8.11" flexi_logger = { version = "0.27.4", features = ["colors", "is-terminal"] } tokio-stream = { version = "0.1.14", features = ["net"] } derivative = "2.2.0" -nextcloud-config-parser = { version = "0.9.1", features = ["redis-connect"] } +nextcloud-config-parser = { version = "0.10.0", features = ["redis-connect"] } url = "2.5.0" -clap = { version = "4.5.1", features = ["derive"] } +clap = { version = "4.5.2", features = ["derive"] } [dev-dependencies] mini-redis = "0.4.1" diff --git a/src/redis.rs b/src/redis.rs index 309c2ccf..278a2a43 100644 --- a/src/redis.rs +++ b/src/redis.rs @@ -1,6 +1,6 @@ use crate::error::ConfigError; use crate::Result; -use redis::aio::{Connection, PubSub}; +use redis::aio::{MultiplexedConnection, PubSub}; use redis::cluster::ClusterClient; use redis::cluster_async::ClusterConnection; use redis::{AsyncCommands, Client, ConnectionInfo, RedisError}; @@ -22,14 +22,16 @@ impl Redis { // since pubsub performs a multicast for all nodes in a cluster, // listening to a single server in the cluster is sufficient for cluster setups let client = Client::open(self.config.first().unwrap().clone())?; - Ok(client.get_async_connection().await?.into_pubsub()) + client.get_async_pubsub().await } pub async fn connect(&self) -> Result { let connection = match self.config.as_slice() { [single] => { - let client = Client::open(single.clone())?.get_async_connection().await?; - RedisConnection::Async(client) + let client = Client::open(single.clone())? + .get_multiplexed_async_connection() + .await?; + RedisConnection::Single(client) } config => { let client = ClusterClient::new(config.to_vec())? @@ -43,14 +45,14 @@ impl Redis { } pub enum RedisConnection { - Async(Connection), + Single(MultiplexedConnection), Cluster(ClusterConnection), } impl RedisConnection { pub async fn del(&mut self, key: &str) -> Result<(), RedisError> { match self { - RedisConnection::Async(client) => { + RedisConnection::Single(client) => { client.del(key).await?; } RedisConnection::Cluster(client) => { @@ -62,14 +64,14 @@ impl RedisConnection { pub async fn get(&mut self, key: &str) -> Result { Ok(match self { - RedisConnection::Async(client) => client.get(key).await?, + RedisConnection::Single(client) => client.get(key).await?, RedisConnection::Cluster(client) => client.get(key).await?, }) } pub async fn set(&mut self, key: &str, value: &str) -> Result<()> { match self { - RedisConnection::Async(client) => { + RedisConnection::Single(client) => { client.set(key, value).await?; } RedisConnection::Cluster(client) => { diff --git a/test_client/Cargo.toml b/test_client/Cargo.toml index 159c1cf7..0e3736e5 100644 --- a/test_client/Cargo.toml +++ b/test_client/Cargo.toml @@ -11,5 +11,5 @@ ureq = "2.9.6" flexi_logger = { version = "0.27.4", features = ["colors"] } log = "0.4.21" base64 = "0.22.0" -miette = { version = "7.1.0", features = ["fancy"] } +miette = { version = "7.2.0", features = ["fancy"] } url = "2.5.0" diff --git a/tests/integration.rs b/tests/integration.rs index 05e3c93d..66edc618 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -197,9 +197,9 @@ impl Services { } } - async fn redis_client(&self) -> redis::aio::Connection { + async fn redis_client(&self) -> redis::aio::MultiplexedConnection { let client = redis::Client::open(self.config().redis.first().unwrap().clone()).unwrap(); - client.get_async_connection().await.unwrap() + client.get_multiplexed_async_connection().await.unwrap() } fn add_user(&self, username: &str, password: &str) {