diff options
author | lictex_ <lictex_steaven@outlook.com> | 2023-11-28 00:25:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 17:25:32 +0100 |
commit | 80238d7f48fd86ef939e74df9fdc9678ee78a208 (patch) | |
tree | e10fade181d41cc66b071fa801bf228910877597 /askama_axum/tests | |
parent | a13105fe082f638ffc2c689d8c0ccb23dceed034 (diff) | |
download | askama-80238d7f48fd86ef939e74df9fdc9678ee78a208.tar.gz askama-80238d7f48fd86ef939e74df9fdc9678ee78a208.tar.bz2 askama-80238d7f48fd86ef939e74df9fdc9678ee78a208.zip |
askama_axum: update axum to 0.7 (#918)
Diffstat (limited to 'askama_axum/tests')
-rw-r--r-- | askama_axum/tests/basic.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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!"); } |