aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-12-21 23:17:14 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2022-01-04 21:30:15 +0100
commit42d80ad6cdb1a4ff9ff8fcc088b25d5f7b66a393 (patch)
tree7faca2dc4d177a109e4c7849a1c1f5f24af72999 /askama_shared
parent6c8c0d63065608ca079110fe20721b7c4d8594f8 (diff)
downloadaskama-42d80ad6cdb1a4ff9ff8fcc088b25d5f7b66a393.tar.gz
askama-42d80ad6cdb1a4ff9ff8fcc088b25d5f7b66a393.tar.bz2
askama-42d80ad6cdb1a4ff9ff8fcc088b25d5f7b66a393.zip
askama_actix: revert to actix-web v3 for release
Diffstat (limited to '')
-rw-r--r--askama_shared/src/generator.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 56c82aa..1d8d32b 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -201,14 +201,15 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
// Implement Actix-web's `Responder`.
fn impl_actix_web_responder(&mut self, buf: &mut Buffer) -> Result<(), CompileError> {
self.write_header(buf, "::actix_web::Responder", None)?;
- buf.writeln("type Body = actix_web::body::BoxBody;")?;
+ buf.writeln("type Future = ::askama_actix::futures::Ready<::std::result::Result<::actix_web::HttpResponse, Self::Error>>;")?;
+ buf.writeln("type Error = ::actix_web::Error;")?;
buf.writeln(
"fn respond_to(self, _req: &::actix_web::HttpRequest) \
- -> ::actix_web::HttpResponse<Self::Body> {",
+ -> Self::Future {",
)?;
buf.writeln("use ::askama_actix::TemplateToResponse;")?;
- buf.writeln("self.to_response()")?;
+ buf.writeln("::askama_actix::futures::ready(self.to_response())")?;
buf.writeln("}")?;
buf.writeln("}")