From 80238d7f48fd86ef939e74df9fdc9678ee78a208 Mon Sep 17 00:00:00 2001 From: lictex_ Date: Tue, 28 Nov 2023 00:25:32 +0800 Subject: askama_axum: update axum to 0.7 (#918) --- askama_axum/tests/basic.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'askama_axum/tests') 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!"); } -- cgit