aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Michael Alyn Miller <malyn@strangeGizmo.com>2021-12-04 16:49:06 -0800
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-12-05 10:00:02 +0100
commitd77553d826f3c90999e0dd84f35cac3690c3d0ca (patch)
tree1e85deec731e92dbaca13a00c530f86ebefeeeaf /askama_shared/src/generator.rs
parente0daa9b83a1a69ff955333eed8c0dddb0f438aaf (diff)
downloadaskama-d77553d826f3c90999e0dd84f35cac3690c3d0ca.tar.gz
askama-d77553d826f3c90999e0dd84f35cac3690c3d0ca.tar.bz2
askama-d77553d826f3c90999e0dd84f35cac3690c3d0ca.zip
Update axum to 0.4 (by switching to axum-core)
Diffstat (limited to 'askama_shared/src/generator.rs')
-rw-r--r--askama_shared/src/generator.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 368db9f..738b878 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -227,12 +227,10 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
// Implement Axum's `IntoResponse`.
fn impl_axum_into_response(&mut self, buf: &mut Buffer) -> Result<(), CompileError> {
- self.write_header(buf, "::axum::response::IntoResponse", None)?;
+ self.write_header(buf, "::askama_axum::IntoResponse", None)?;
buf.writeln(
- "type Body = ::axum::body::Full<::axum::body::Bytes>;\n\
- type BodyError = std::convert::Infallible;\n\
- fn into_response(self)\
- -> ::axum::http::Response<Self::Body> {",
+ "fn into_response(self)\
+ -> ::askama_axum::Response<::askama_axum::BoxBody> {",
)?;
let ext = self.input.extension().unwrap_or("txt");
buf.writeln(&format!("::askama_axum::into_response(&self, {:?})", ext))?;