Skip to content

Commit

Permalink
Merge pull request #3893 from element-hq/quenting/axum-0.8
Browse files Browse the repository at this point in the history
Upgrade axum to 0.8
  • Loading branch information
sandhose authored Jan 28, 2025
2 parents c376790 + 11b5355 commit 879eb6a
Show file tree
Hide file tree
Showing 21 changed files with 108 additions and 163 deletions.
98 changes: 40 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ syn2mas = { path = "./crates/syn2mas", version = "=0.13.0-rc.1" }

# OpenAPI schema generation and validation
[workspace.dependencies.aide]
version = "0.13.5"
features = ["axum", "axum-headers", "macros"]
version = "0.14.0"
features = ["axum", "axum-extra", "axum-json", "axum-query", "macros"]

# GraphQL server
[workspace.dependencies.async-graphql]
Expand All @@ -79,11 +79,11 @@ version = "1.0.95"

# HTTP router
[workspace.dependencies.axum]
version = "0.7.9"
version = "0.8.1"

# Extra utilities for Axum
[workspace.dependencies.axum-extra]
version = "0.9.6"
version = "0.10.0"
features = ["cookie-private", "cookie-key-expansion", "typed-header"]

# Constant-time base64
Expand Down Expand Up @@ -279,18 +279,18 @@ features = [

# Sentry error tracking
[workspace.dependencies.sentry]
version = "0.34.0"
version = "0.36.0"
default-features = false
features = ["backtrace", "contexts", "panic", "tower", "reqwest"]

# Sentry tower layer
[workspace.dependencies.sentry-tower]
version = "0.34.0"
version = "0.36.0"
features = ["http"]

# Sentry tracing integration
[workspace.dependencies.sentry-tracing]
version = "0.34.0"
version = "0.36.0"

# Serialization and deserialization
[workspace.dependencies.serde]
Expand Down
4 changes: 1 addition & 3 deletions crates/axum-utils/src/client_authorization.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright 2024 New Vector Ltd.
// Copyright 2024, 2025 New Vector Ltd.
// Copyright 2022-2024 The Matrix.org Foundation C.I.C.
//
// SPDX-License-Identifier: AGPL-3.0-only
// Please see LICENSE in the repository root for full details.

use std::collections::HashMap;

use async_trait::async_trait;
use axum::{
extract::{
rejection::{FailedToDeserializeForm, FormRejection},
Expand Down Expand Up @@ -321,7 +320,6 @@ impl IntoResponse for ClientAuthorizationError {
}
}

#[async_trait]
impl<S, F> FromRequest<S> for ClientAuthorization<F>
where
F: DeserializeOwned,
Expand Down
4 changes: 1 addition & 3 deletions crates/axum-utils/src/cookies.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 New Vector Ltd.
// Copyright 2024, 2025 New Vector Ltd.
// Copyright 2022-2024 The Matrix.org Foundation C.I.C.
//
// SPDX-License-Identifier: AGPL-3.0-only
Expand All @@ -8,7 +8,6 @@
use std::convert::Infallible;

use async_trait::async_trait;
use axum::{
extract::{FromRef, FromRequestParts},
response::{IntoResponseParts, ResponseParts},
Expand Down Expand Up @@ -65,7 +64,6 @@ impl CookieManager {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for CookieJar
where
CookieManager: FromRef<S>,
Expand Down
4 changes: 1 addition & 3 deletions crates/axum-utils/src/user_authorization.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright 2024 New Vector Ltd.
// Copyright 2024, 2025 New Vector Ltd.
// Copyright 2022-2024 The Matrix.org Foundation C.I.C.
//
// SPDX-License-Identifier: AGPL-3.0-only
// Please see LICENSE in the repository root for full details.

use std::{collections::HashMap, error::Error};

use async_trait::async_trait;
use axum::{
extract::{
rejection::{FailedToDeserializeForm, FormRejection},
Expand Down Expand Up @@ -284,7 +283,6 @@ where
}
}

#[async_trait]
impl<S, F> FromRequest<S> for UserAuthorization<F>
where
F: DeserializeOwned,
Expand Down
Loading

0 comments on commit 879eb6a

Please sign in to comment.