From 23ff7ad636b4c0e26d3242747d50b7123831a1a8 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 20 Feb 2019 20:02:56 +0100 Subject: Simplify actix-web implementations --- askama_derive/src/generator.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'askama_derive/src') diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 8f2866e..4a6eb89 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -234,11 +234,8 @@ impl<'a> Generator<'a> { -> ::std::result::Result {", ); - let ext = match self.input.path.extension() { - Some(s) => s.to_str().unwrap(), - None => "txt", - }; - buf.writeln(&format!("::askama::actix_web::respond(&self, {:?})", ext)); + buf.writeln("use ::askama::actix_web::TemplateIntoResponse;"); + buf.writeln("self.into_response()"); buf.writeln("}"); buf.writeln("}"); -- cgit