diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-03-18 10:13:11 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-03-18 10:13:11 +0100 |
commit | 9a4106e77edfc67edc802814ee59759f51a96bdf (patch) | |
tree | b197176ba9ec5f34b0f99b64160bcaddfdfe1b8b | |
parent | e89eee3ffc63c7b96b32e4ab815e1b99c7facdcb (diff) | |
download | askama-9a4106e77edfc67edc802814ee59759f51a96bdf.tar.gz askama-9a4106e77edfc67edc802814ee59759f51a96bdf.tar.bz2 askama-9a4106e77edfc67edc802814ee59759f51a96bdf.zip |
Fix formatting with cargo fmt
Diffstat (limited to '')
-rw-r--r-- | askama/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 694f298..de25c3e 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -489,8 +489,8 @@ pub mod rocket { #[cfg(feature = "with-actix-web")] pub mod actix_web { extern crate actix_web; - extern crate mime_guess; extern crate bytes; + extern crate mime_guess; use std::fmt; @@ -502,7 +502,7 @@ pub mod actix_web { #[inline] pub fn with_capacity(size: usize) -> Self { Self { - buf: bytes::BytesMut::with_capacity(size) + buf: bytes::BytesMut::with_capacity(size), } } @@ -540,7 +540,9 @@ pub mod actix_web { .map_err(|_| ErrorInternalServerError("Template parsing error"))?; let ctype = get_mime_type(T::extension().unwrap_or("txt")).to_string(); - Ok(HttpResponse::Ok().content_type(ctype.as_str()).body(buffer.freeze())) + Ok(HttpResponse::Ok() + .content_type(ctype.as_str()) + .body(buffer.freeze())) } } } |