aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
authorLibravatar DCjanus <DCjanus@dcjanus.com>2020-01-11 23:39:17 +0800
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-11 17:43:55 +0100
commit6b11df9e92c7414968d71c65249d273183ecd716 (patch)
tree7ebe693dd95d87ed7c1bc0a4976a7bb40e8dab9b /askama_derive/src
parentcef055108de6c51c1423cd6a8919730ef01f64a3 (diff)
downloadaskama-6b11df9e92c7414968d71c65249d273183ecd716.tar.gz
askama-6b11df9e92c7414968d71c65249d273183ecd716.tar.bz2
askama-6b11df9e92c7414968d71c65249d273183ecd716.zip
upgrade dependencies(actix-web 0.7 -> 2)
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 9f60847..f76f6c1 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -242,15 +242,15 @@ impl<'a> Generator<'a> {
// Implement Actix-web's `Responder`.
fn impl_actix_web_responder(&mut self, buf: &mut Buffer) {
self.write_header(buf, "::askama::actix_web::Responder", None);
- buf.writeln("type Item = ::askama::actix_web::HttpResponse;");
+ buf.writeln("type Future = ::futures::future::Ready<::std::result::Result<::askama::actix_web::HttpResponse, Self::Error>>;");
buf.writeln("type Error = ::askama::actix_web::Error;");
buf.writeln(
- "fn respond_to<S>(self, _req: &::askama::actix_web::HttpRequest<S>) \
- -> ::std::result::Result<Self::Item, Self::Error> {",
+ "fn respond_to(self, _req: &::askama::actix_web::HttpRequest) \
+ -> Self::Future {",
);
buf.writeln("use ::askama::actix_web::TemplateIntoResponse;");
- buf.writeln("self.into_response()");
+ buf.writeln("::futures::future::ready(self.into_response())");
buf.writeln("}");
buf.writeln("}");