From f65d22396b851eede6784a76bb96546b22aacc0c Mon Sep 17 00:00:00 2001 From: Omar Zabala-Ferrera Date: Wed, 1 Jan 2025 11:04:45 -0500 Subject: [PATCH] Updating axum. Signed-off-by: Omar Zabala-Ferrera --- Cargo.toml | 6 +++--- example-projects/axum-example/Cargo.toml | 6 +++--- src/binding/axum/extract.rs | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 17521c3..cb9dfc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ bytes = { version = "^1.0", optional = true } futures = { version = "^0.3", optional = true, features = ["compat"]} http = { version = "1.2", optional = true} http-0-2 = { version = "0.2", optional = true, package = "http"} -axum-lib = { version = "^0.7", optional = true, package="axum"} +axum-lib = { version = "^0.8", optional = true, package="axum"} http-body-util = {version = "^0.1", optional = true} poem-lib = { version = "^3.1", optional = true, package = "poem" } nats-lib = { version = "0.25.0", optional = true, package = "nats" } @@ -67,7 +67,7 @@ hostname = "^0.4" web-sys = { version = "^0.3", features = ["Window", "Location"] } [target.'cfg(not(target_os = "wasi"))'.dependencies] -hyper = { version = "^1.4", optional = true, package="hyper" } +hyper = { version = "^1.5", optional = true, package="hyper" } hyper-0-14 = { version = "^0.14", optional = true, package = "hyper"} [target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dependencies] @@ -75,7 +75,7 @@ hyper_wasi = { version = "0.15", features = ["full"], optional = true } [dev-dependencies] rstest = "0.23" -claims = "0.7.1" +claims = "0.8" version-sync = "0.9.2" serde_yaml = "^0.9" rmp-serde = "1" diff --git a/example-projects/axum-example/Cargo.toml b/example-projects/axum-example/Cargo.toml index c1dc625..6b72dd9 100644 --- a/example-projects/axum-example/Cargo.toml +++ b/example-projects/axum-example/Cargo.toml @@ -6,15 +6,15 @@ edition = "2021" [dependencies] cloudevents-sdk = { path = "../..", features = ["axum"] } -axum = "^0.7" +axum = "^0.8" http = "^1.1" tokio = { version = "^1", features = ["full"] } tracing = "^0.1" tracing-subscriber = "^0.3" -tower-http = { version = "^0.5", features = ["trace"] } +tower-http = { version = "^0.6", features = ["trace"] } [dev-dependencies] -tower = { version = "^0.4", features = ["util"] } +tower = { version = "^0.5", features = ["util"] } serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" chrono = { version = "^0.4", features = ["serde"] } diff --git a/src/binding/axum/extract.rs b/src/binding/axum/extract.rs index 549df0a..cf86df0 100644 --- a/src/binding/axum/extract.rs +++ b/src/binding/axum/extract.rs @@ -1,4 +1,3 @@ -use async_trait::async_trait; use axum::body::Bytes; use axum::extract::{FromRequest, Request}; use axum::response::Response; @@ -9,7 +8,6 @@ use http::StatusCode; use crate::binding::http::to_event; use crate::event::Event; -#[async_trait] impl FromRequest for Event where Bytes: FromRequest,