Skip to content

Commit

Permalink
remove some outdated comments in expand_partial
Browse files Browse the repository at this point in the history
  • Loading branch information
cmrschwarz committed Jul 15, 2024
1 parent 653b348 commit 1adbc0a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
return Err(RenderErrorReason::PartialNotFound(tname.to_owned()).into());
};

// clone to avoid lifetime issue
// FIXME refactor this to avoid

// if tname == PARTIAL_BLOCK
let is_partial_block = tname == PARTIAL_BLOCK;

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

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

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

// cleanup

let trailing_newline = rc.get_trailine_newline();

if d.template().is_some() {
Expand Down

0 comments on commit 1adbc0a

Please sign in to comment.