From 56c050275b0066d0eaa77264b1a3bfcbc370b2bb Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Jun 2018 12:11:07 +0200 Subject: Rename variable for consistency --- askama_derive/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'askama_derive/src') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index b14b16f..0e372ed 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -32,13 +32,13 @@ pub fn derive_template(input: TokenStream) -> TokenStream { /// the parse tree and/or generated source according to the `print` key's /// value as passed to the `template()` attribute. fn build_template(ast: &syn::DeriveInput) -> String { - let data = input::TemplateInput::new(ast); - let nodes = parser::parse(data.source.as_ref()); - if data.meta.print == Print::Ast || data.meta.print == Print::All { + let input = input::TemplateInput::new(ast); + let nodes = parser::parse(input.source.as_ref()); + if input.meta.print == Print::Ast || input.meta.print == Print::All { println!("{:?}", nodes); } - let code = generator::generate(&data, &nodes); - if data.meta.print == Print::Code || data.meta.print == Print::All { + let code = generator::generate(&input, &nodes); + if input.meta.print == Print::Code || input.meta.print == Print::All { println!("{}", code); } code -- cgit