aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-10-10 15:17:36 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-11-01 12:52:09 +0100
commitdaa404713e8e1e5294a3cf65040172d33e43a0eb (patch)
tree9675014cc1e40fad7963e04d3ad3040293affc40 /askama_derive/src/lib.rs
parentbabea28312387a22642cb974cc4b97e9fe7fed49 (diff)
downloadaskama-daa404713e8e1e5294a3cf65040172d33e43a0eb.tar.gz
askama-daa404713e8e1e5294a3cf65040172d33e43a0eb.tar.bz2
askama-daa404713e8e1e5294a3cf65040172d33e43a0eb.zip
Avoid passing around duplicate data
Diffstat (limited to 'askama_derive/src/lib.rs')
-rw-r--r--askama_derive/src/lib.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index a5eb67a..547a449 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -60,14 +60,8 @@ pub(crate) fn build_template(ast: &syn::DeriveInput) -> Result<String, CompileEr
eprintln!("{:?}", templates[input.path.as_path()].nodes());
}
- let code = Generator::new(
- &input,
- &contexts,
- heritage.as_ref(),
- MapChain::default(),
- config.whitespace,
- )
- .build(&contexts[input.path.as_path()])?;
+ let code = Generator::new(&input, &contexts, heritage.as_ref(), MapChain::default())
+ .build(&contexts[input.path.as_path()])?;
if input.print == Print::Code || input.print == Print::All {
eprintln!("{code}");
}