examples: Update to redis 0.32 (#3471)

This commit is contained in:
tottoto
2025-09-13 09:06:00 +02:00
committed by GitHub
parent 038f0966a8
commit 83d19e7b4f
3 changed files with 35 additions and 51 deletions
Generated
+29 -43
View File
@@ -499,18 +499,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "bb8"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89aabfae550a5c44b43ab941844ffcd2e993cb6900b342debf59e9ea74acdb8"
dependencies = [
"async-trait",
"futures-util",
"parking_lot",
"tokio",
]
[[package]] [[package]]
name = "bb8" name = "bb8"
version = "0.9.0" version = "0.9.0"
@@ -528,19 +516,18 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e570e6557cd0f88d28d32afa76644873271a70dc22656df565b2021c4036aa9c" checksum = "e570e6557cd0f88d28d32afa76644873271a70dc22656df565b2021c4036aa9c"
dependencies = [ dependencies = [
"bb8 0.9.0", "bb8",
"tokio", "tokio",
"tokio-postgres", "tokio-postgres",
] ]
[[package]] [[package]]
name = "bb8-redis" name = "bb8-redis"
version = "0.17.0" version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1781f22daa0ae97d934fdf04a5c66646f154a164c4bdc157ec8d3c11166c05cc" checksum = "5143936af5e1eea1a881e3e3d21b6777da6315e5e307bc3d0c2301c44fa37da9"
dependencies = [ dependencies = [
"async-trait", "bb8",
"bb8 0.8.6",
"redis", "redis",
] ]
@@ -1107,7 +1094,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcc26599f590c7e5b182a05061cfb445f216bb069df72eb31f38cffde8ca598" checksum = "7fcc26599f590c7e5b182a05061cfb445f216bb069df72eb31f38cffde8ca598"
dependencies = [ dependencies = [
"bb8 0.9.0", "bb8",
"diesel", "diesel",
"futures-core", "futures-core",
"futures-util", "futures-util",
@@ -1880,7 +1867,7 @@ name = "example-tokio-postgres"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"axum", "axum",
"bb8 0.9.0", "bb8",
"bb8-postgres", "bb8-postgres",
"tokio", "tokio",
"tokio-postgres", "tokio-postgres",
@@ -1893,9 +1880,7 @@ name = "example-tokio-redis"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"axum", "axum",
"bb8 0.8.6",
"bb8-redis", "bb8-redis",
"redis",
"tokio", "tokio",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
@@ -2534,7 +2519,7 @@ dependencies = [
"http-body", "http-body",
"hyper", "hyper",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2 0.5.8",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -2745,7 +2730,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
dependencies = [ dependencies = [
"socket2", "socket2 0.5.8",
"widestring", "widestring",
"windows-sys 0.48.0", "windows-sys 0.48.0",
"winreg", "winreg",
@@ -2842,9 +2827,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.169" version = "0.2.175"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
[[package]] [[package]]
name = "libloading" name = "libloading"
@@ -3110,7 +3095,7 @@ dependencies = [
"serde_with", "serde_with",
"sha-1", "sha-1",
"sha2 0.10.8", "sha2 0.10.8",
"socket2", "socket2 0.5.8",
"stringprep", "stringprep",
"strsim", "strsim",
"take_mut", "take_mut",
@@ -3661,7 +3646,7 @@ dependencies = [
"quinn-udp", "quinn-udp",
"rustc-hash 2.1.0", "rustc-hash 2.1.0",
"rustls 0.23.20", "rustls 0.23.20",
"socket2", "socket2 0.5.8",
"thiserror 2.0.9", "thiserror 2.0.9",
"tokio", "tokio",
"tracing", "tracing",
@@ -3696,7 +3681,7 @@ dependencies = [
"cfg_aliases", "cfg_aliases",
"libc", "libc",
"once_cell", "once_cell",
"socket2", "socket2 0.5.8",
"tracing", "tracing",
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
@@ -3792,23 +3777,20 @@ dependencies = [
[[package]] [[package]]
name = "redis" name = "redis"
version = "0.27.6" version = "0.32.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d8f99a4090c89cc489a94833c901ead69bfbf3877b4867d5482e321ee875bc" checksum = "7cd3650deebc68526b304898b192fa4102a4ef0b9ada24da096559cb60e0eef8"
dependencies = [ dependencies = [
"arc-swap",
"async-trait",
"bytes", "bytes",
"cfg-if 1.0.0",
"combine", "combine",
"futures-util", "futures-util",
"itertools 0.13.0",
"itoa", "itoa",
"num-bigint", "num-bigint",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"ryu", "ryu",
"sha1_smol", "socket2 0.6.0",
"socket2",
"tokio", "tokio",
"tokio-util", "tokio-util",
"url", "url",
@@ -4304,12 +4286,6 @@ dependencies = [
"digest 0.10.7", "digest 0.10.7",
] ]
[[package]]
name = "sha1_smol"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.9.9" version = "0.9.9"
@@ -4420,6 +4396,16 @@ dependencies = [
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
[[package]]
name = "socket2"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
dependencies = [
"libc",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "spin" name = "spin"
version = "0.9.8" version = "0.9.8"
@@ -4897,7 +4883,7 @@ dependencies = [
"parking_lot", "parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"socket2", "socket2 0.5.8",
"tokio-macros", "tokio-macros",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@@ -4954,7 +4940,7 @@ dependencies = [
"postgres-protocol", "postgres-protocol",
"postgres-types", "postgres-types",
"rand 0.8.5", "rand 0.8.5",
"socket2", "socket2 0.5.8",
"tokio", "tokio",
"tokio-util", "tokio-util",
"whoami", "whoami",
+1 -3
View File
@@ -6,9 +6,7 @@ publish = false
[dependencies] [dependencies]
axum = { path = "../../axum" } axum = { path = "../../axum" }
bb8 = "0.8.5" bb8-redis = "0.24"
bb8-redis = "0.17.0"
redis = "0.27.2"
tokio = { version = "1.0", features = ["full"] } tokio = { version = "1.0", features = ["full"] }
tracing = "0.1" tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+5 -5
View File
@@ -10,13 +10,13 @@ use axum::{
routing::get, routing::get,
Router, Router,
}; };
use bb8::{Pool, PooledConnection}; use bb8_redis::{
use bb8_redis::RedisConnectionManager; bb8::{self, Pool, PooledConnection},
use redis::AsyncCommands; redis::AsyncCommands,
RedisConnectionManager,
};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
use bb8_redis::bb8;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
tracing_subscriber::registry() tracing_subscriber::registry()