aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Sergey Pashinin <sergey@pashinin.com>2021-11-11 12:55:09 +0300
committerLibravatar GitHub <noreply@github.com>2021-11-11 10:55:09 +0100
commita8503e0fa2d6065b1c471becf76dde68571b7984 (patch)
treee893f04e6e5e01397ff675a2779515a621acd2a6 /askama_shared/src/generator.rs
parentcfe83bcb73b9e0cfd8a2d3151e4cab38327eabea (diff)
downloadaskama-a8503e0fa2d6065b1c471becf76dde68571b7984.tar.gz
askama-a8503e0fa2d6065b1c471becf76dde68571b7984.tar.bz2
askama-a8503e0fa2d6065b1c471becf76dde68571b7984.zip
Prepare for actix-web v4 (#553)
Diffstat (limited to 'askama_shared/src/generator.rs')
-rw-r--r--askama_shared/src/generator.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 7500cc7..6c1b151 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -210,15 +210,13 @@ 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 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) \
- -> Self::Future {",
+ -> ::actix_web::HttpResponse {",
)?;
buf.writeln("use ::askama_actix::TemplateToResponse;")?;
- buf.writeln("::askama_actix::futures::ready(self.to_response())")?;
+ buf.writeln("self.to_response()")?;
buf.writeln("}")?;
buf.writeln("}")