From f05a924c49afb537b624cfe3cbef3a95b13759a2 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Jun 2018 12:17:45 +0200 Subject: Inline TemplateMeta into TemplateInput --- askama_derive/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'askama_derive/src/lib.rs') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index a2b4ace..dcae4d3 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -34,18 +34,18 @@ pub fn derive_template(input: TokenStream) -> TokenStream { /// value as passed to the `template()` attribute. fn build_template(ast: &syn::DeriveInput) -> String { let input = input::TemplateInput::new(ast); - let source = match input.meta.source { + let source = match input.source { Source::Source(ref s) => s.clone(), Source::Path(_) => path::get_template_source(&input.path) }; let nodes = parser::parse(&source); - if input.meta.print == Print::Ast || input.meta.print == Print::All { + if input.print == Print::Ast || input.print == Print::All { println!("{:?}", nodes); } let code = generator::generate(&input, &nodes); - if input.meta.print == Print::Code || input.meta.print == Print::All { + if input.print == Print::Code || input.print == Print::All { println!("{}", code); } code -- cgit