diff options
author | Andrew Dona-Couch -- GitHub drop ICE <hi@andrewcou.ch> | 2023-03-06 16:18:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 22:18:45 +0100 |
commit | dc864486ec8c258388b4e006d9517e6e30c34a4d (patch) | |
tree | 4419a02845917440f2846880ddf872a649b50373 /askama_derive/src/generator.rs | |
parent | 417cb924ae1f94d54e2eb13ebc7e9fab91b84588 (diff) | |
download | askama-dc864486ec8c258388b4e006d9517e6e30c34a4d.tar.gz askama-dc864486ec8c258388b4e006d9517e6e30c34a4d.tar.bz2 askama-dc864486ec8c258388b4e006d9517e6e30c34a4d.zip |
Propogate size_hint from sub-blocks (#788)
Closes #786
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r-- | askama_derive/src/generator.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index fc74f34..d8093c3 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -630,16 +630,16 @@ impl<'a> Generator<'a> { self.write_let(buf, ws, var, val)?; } Node::Cond(ref conds, ws) => { - self.write_cond(ctx, buf, conds, ws)?; + size_hint += self.write_cond(ctx, buf, conds, ws)?; } Node::Match(ws1, ref expr, ref arms, ws2) => { - self.write_match(ctx, buf, ws1, expr, arms, ws2)?; + size_hint += self.write_match(ctx, buf, ws1, expr, arms, ws2)?; } Node::Loop(ref loop_block) => { - self.write_loop(ctx, buf, loop_block)?; + size_hint += self.write_loop(ctx, buf, loop_block)?; } Node::BlockDef(ws1, name, _, ws2) => { - self.write_block(buf, Some(name), Ws(ws1.0, ws2.1))?; + size_hint += self.write_block(buf, Some(name), Ws(ws1.0, ws2.1))?; } Node::Include(ws, path) => { size_hint += self.handle_include(ctx, buf, ws, path)?; |