aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 13:19:32 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 13:19:32 +0200
commitd7ba9e0b6d56d7064634f10a78c0827edbab55b4 (patch)
tree772541c47a36433a2c401f249087c838a7ebc0fb /askama_derive/src/generator.rs
parente04d1d3ff68a6131f036be7be850cd3b04c68b30 (diff)
downloadaskama-d7ba9e0b6d56d7064634f10a78c0827edbab55b4.tar.gz
askama-d7ba9e0b6d56d7064634f10a78c0827edbab55b4.tar.bz2
askama-d7ba9e0b6d56d7064634f10a78c0827edbab55b4.zip
Get rid of Generator::default() method
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r--askama_derive/src/generator.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index a56bd2d..349ecf9 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -70,7 +70,7 @@ pub fn generate(input: &TemplateInput, nodes: &[Node]) -> String {
}
}
- Generator::default().build(&Context {
+ Generator::new(SetChain::new(), 0).build(&Context {
input,
nodes,
blocks: &blocks,
@@ -132,10 +132,6 @@ impl<'a> Generator<'a> {
}
}
- fn default<'n>() -> Generator<'n> {
- Self::new(SetChain::new(), 0)
- }
-
fn child(&mut self) -> Generator {
let locals = SetChain::with_parent(&self.locals);
Self::new(locals, self.indent)