aboutsummaryrefslogtreecommitdiffstats
path: root/askama_axum
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_axum/Cargo.toml11
-rw-r--r--askama_axum/tests/basic.rs3
2 files changed, 8 insertions, 6 deletions
diff --git a/askama_axum/Cargo.toml b/askama_axum/Cargo.toml
index 034d235..d566c1e 100644
--- a/askama_axum/Cargo.toml
+++ b/askama_axum/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "askama_axum"
-version = "0.3.0"
+version = "0.4.0"
edition = "2021"
rust-version = "1.65"
description = "Axum integration for Askama templates"
@@ -15,12 +15,13 @@ readme = "README.md"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-axum", "mime", "mime_guess"] }
-axum-core = "0.3"
-http = "0.2"
+axum-core = "0.4"
+http = "1.0"
[dev-dependencies]
-axum = { version = "0.6", default-features = false }
-hyper = { version = "0.14", features = ["full"] }
+axum = { version = "0.7", default-features = false }
+http-body-util = "0.1"
+hyper = { version = "1.0", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
diff --git a/askama_axum/tests/basic.rs b/askama_axum/tests/basic.rs
index acd53b7..3099dac 100644
--- a/askama_axum/tests/basic.rs
+++ b/askama_axum/tests/basic.rs
@@ -5,6 +5,7 @@ use axum::{
routing::get,
Router,
};
+use http_body_util::BodyExt;
use tower::util::ServiceExt;
#[derive(Template)]
@@ -30,6 +31,6 @@ async fn template_to_response() {
let headers = res.headers();
assert_eq!(headers["Content-Type"], "text/html; charset=utf-8");
- let body = hyper::body::to_bytes(res.into_body()).await.unwrap();
+ let body = res.into_body().collect().await.unwrap().to_bytes();
assert_eq!(&body[..], b"Hello, world!");
}