diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-02 22:22:21 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-02 22:58:13 +0100 |
commit | 9085e1e3dd0ae9924433c6e5166c33e0f6d2a283 (patch) | |
tree | 915ba5c1bfcb1c6b9c1e78d3eb21bdfe49efb1cb | |
parent | 8d704a4923c79fe405b1b403e6868960456298cc (diff) | |
download | askama-9085e1e3dd0ae9924433c6e5166c33e0f6d2a283.tar.gz askama-9085e1e3dd0ae9924433c6e5166c33e0f6d2a283.tar.bz2 askama-9085e1e3dd0ae9924433c6e5166c33e0f6d2a283.zip |
Fix Actix trait impl
-rw-r--r-- | askama/src/lib.rs | 4 |
1 files 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<T: super::Template> TemplateIntoResponse for T { fn into_response(&self) -> Result<HttpResponse, Error> { - 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())) |