From 9085e1e3dd0ae9924433c6e5166c33e0f6d2a283 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 2 Jan 2020 22:22:21 +0100 Subject: Fix Actix trait impl --- askama/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 000acc1..f36288a 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -617,11 +617,11 @@ pub mod actix_web { impl TemplateIntoResponse for T { fn into_response(&self) -> Result { - let mut buffer = BytesWriter::with_capacity(T::size_hint()); + let mut buffer = BytesWriter::with_capacity(self.size_hint()); self.render_into(&mut buffer) .map_err(|_| ErrorInternalServerError("Template parsing error"))?; - let ctype = super::get_mime_type(T::extension().unwrap_or("txt")).to_string(); + let ctype = super::get_mime_type(self.extension().unwrap_or("txt")).to_string(); Ok(HttpResponse::Ok() .content_type(ctype.as_str()) .body(buffer.freeze())) -- cgit