diff --git a/Cargo.lock b/Cargo.lock index c6eb2f9..3157748 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -114,17 +114,6 @@ dependencies = [ "nom", ] -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - [[package]] name = "atoi" version = "1.0.0" @@ -155,13 +144,13 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.7.9" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" dependencies = [ - "async-trait", "axum-core", "bytes", + "form_urlencoded", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -181,7 +170,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower 0.5.1", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -189,11 +178,10 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" dependencies = [ - "async-trait", "bytes", "futures-util", "http 1.1.0", @@ -1203,9 +1191,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -2415,14 +2403,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tokio", "tower-layer", "tower-service", @@ -2431,11 +2419,10 @@ dependencies = [ [[package]] name = "tower-cookies" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd0118512cf0b3768f7fcccf0bef1ae41d68f2b45edc1e77432b36c97c56c6d" +checksum = "151b5a3e3c45df17466454bb74e9ecedecc955269bdedbf4d150dfa393b55a36" dependencies = [ - "async-trait", "axum-core", "cookie", "futures-util", diff --git a/Cargo.toml b/Cargo.toml index 51d5842..c811d5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ categories = ["web-programming"] [dependencies] askama = "0.12.1" atom_syndication = "0.12.6" -axum = "0.7.9" +axum = "0.8.1" chrono = "0.4.39" color-backtrace = "0.6.1" eyre = "0.6.5" @@ -26,11 +26,15 @@ pulldown-cmark = "0.12.2" pulldown-cmark-escape = "0.11.0" regex = "1.11.1" serde = "1.0.217" -sqlx = { version = "0.6.3", features = ["chrono", "postgres", "runtime-tokio-rustls"] } +sqlx = { version = "0.6.3", features = [ + "chrono", + "postgres", + "runtime-tokio-rustls", +] } stable-eyre = "0.2.2" tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread"] } toml = "0.8.19" -tower-cookies = "0.10.0" +tower-cookies = "0.11.0" tower-http = { version = "0.6.2", features = ["fs"] } [package.metadata.deb] diff --git a/src/session.rs b/src/session.rs index f4fdf38..4d5bdbf 100644 --- a/src/session.rs +++ b/src/session.rs @@ -1,6 +1,5 @@ use crate::{config::Config, errors::InternalError, model::User}; use axum::{ - async_trait, extract::{Extension, FromRequestParts, OriginalUri}, http::request::Parts, }; @@ -36,7 +35,6 @@ impl Session { } } -#[async_trait] impl FromRequestParts for Session { type Rejection = InternalError; @@ -65,7 +63,6 @@ pub struct Flash { pub error: Option, } -#[async_trait] impl FromRequestParts for Flash { type Rejection = InternalError;