diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-02-15 10:11:51 +0100 |
---|---|---|
committer | Christian Vallentin <vallentinsource@gmail.com> | 2021-02-15 11:10:48 +0100 |
commit | 2dbdcdfb640a5e7c1eecfd6eae71ea9d5a05723e (patch) | |
tree | 43fd2629b0d61df8ce1db8961ec476c1a4c6ad4b /askama_actix/src | |
parent | f5f35dad5626ad20d20f8497227428057bc0d841 (diff) | |
download | askama-2dbdcdfb640a5e7c1eecfd6eae71ea9d5a05723e.tar.gz askama-2dbdcdfb640a5e7c1eecfd6eae71ea9d5a05723e.tar.bz2 askama-2dbdcdfb640a5e7c1eecfd6eae71ea9d5a05723e.zip |
Rename askama_actix trait method as suggested by clippy
By bumping the dependency versions for askama and askama_shared, this should
be safe.
Diffstat (limited to '')
-rw-r--r-- | askama_actix/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askama_actix/src/lib.rs b/askama_actix/src/lib.rs index e0f78ca..742c7f2 100644 --- a/askama_actix/src/lib.rs +++ b/askama_actix/src/lib.rs @@ -3,12 +3,12 @@ use bytes::BytesMut; use actix_web::{error::ErrorInternalServerError, Error, HttpResponse}; -pub trait TemplateIntoResponse { - fn into_response(&self) -> ::std::result::Result<HttpResponse, Error>; +pub trait TemplateToResponse { + fn to_response(&self) -> ::std::result::Result<HttpResponse, Error>; } -impl<T: askama::Template> TemplateIntoResponse for T { - fn into_response(&self) -> ::std::result::Result<HttpResponse, Error> { +impl<T: askama::Template> TemplateToResponse for T { + fn to_response(&self) -> ::std::result::Result<HttpResponse, Error> { let mut buffer = BytesMut::with_capacity(self.size_hint()); self.render_into(&mut buffer) .map_err(|_| ErrorInternalServerError("Template parsing error"))?; |