aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-06 14:51:56 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-06 14:51:56 +0200
commitb9cb5b82e6c87bf0f6037d097476d69f5241bf3a (patch)
tree4bc900914e1c3285b5a0bfdb3bd41d991d426502 /askama_derive/src/lib.rs
parent05f11a6843b482176c32d758e0c4f676d33c16be (diff)
downloadaskama-b9cb5b82e6c87bf0f6037d097476d69f5241bf3a.tar.gz
askama-b9cb5b82e6c87bf0f6037d097476d69f5241bf3a.tar.bz2
askama-b9cb5b82e6c87bf0f6037d097476d69f5241bf3a.zip
Merge handling of trailing newline into get_template_source()
Diffstat (limited to '')
-rw-r--r--askama_derive/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 370c24d..153e352 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -66,10 +66,7 @@ fn get_template_meta(ast: &syn::DeriveInput) -> TemplateMeta {
/// value as passed to the `template()` attribute.
fn build_template(ast: &syn::DeriveInput) -> String {
let meta = get_template_meta(ast);
- let mut src = path::get_template_source(&meta.path);
- if src.ends_with('\n') {
- let _ = src.pop();
- }
+ let src = path::get_template_source(&meta.path);
let nodes = parser::parse(&src);
if meta.print == "ast" || meta.print == "all" {
println!("{:?}", nodes);