aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 12:11:07 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 12:11:07 +0200
commit56c050275b0066d0eaa77264b1a3bfcbc370b2bb (patch)
tree1b88103121247c69640ebe4bebe0c5fddd8e88b4 /askama_derive
parent15c08cf54ef49cdbc41af757893b882e6ab7300e (diff)
downloadaskama-56c050275b0066d0eaa77264b1a3bfcbc370b2bb.tar.gz
askama-56c050275b0066d0eaa77264b1a3bfcbc370b2bb.tar.bz2
askama-56c050275b0066d0eaa77264b1a3bfcbc370b2bb.zip
Rename variable for consistency
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
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