Skip to content

Commit 1adbc0a

Browse files
committed
remove some outdated comments in expand_partial
1 parent 653b348 commit 1adbc0a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/partial.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
6666
return Err(RenderErrorReason::PartialNotFound(tname.to_owned()).into());
6767
};
6868

69-
// clone to avoid lifetime issue
70-
// FIXME refactor this to avoid
71-
72-
// if tname == PARTIAL_BLOCK
7369
let is_partial_block = tname == PARTIAL_BLOCK;
7470

7571
// add partial block depth there are consecutive partial
@@ -90,12 +86,7 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
9086
let mut block_inner = BlockContext::new();
9187
*block_inner.base_path_mut() = base_path.to_vec();
9288

93-
// because block is moved here, we need another bool variable to track
94-
// its status for later cleanup
9589
block_created = true;
96-
// clear blocks to prevent block params from parent
97-
// template to be leaked into partials
98-
// see `test_partial_context_issue_495` for the case.
9990
rc.push_block(block_inner);
10091
}
10192

@@ -143,7 +134,6 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
143134
let result = partial.render(r, ctx, rc, out);
144135

145136
// cleanup
146-
147137
let trailing_newline = rc.get_trailine_newline();
148138

149139
if d.template().is_some() {

0 commit comments

Comments
 (0)