@@ -66,10 +66,6 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
66
66
return Err ( RenderErrorReason :: PartialNotFound ( tname. to_owned ( ) ) . into ( ) ) ;
67
67
} ;
68
68
69
- // clone to avoid lifetime issue
70
- // FIXME refactor this to avoid
71
-
72
- // if tname == PARTIAL_BLOCK
73
69
let is_partial_block = tname == PARTIAL_BLOCK ;
74
70
75
71
// add partial block depth there are consecutive partial
@@ -90,12 +86,7 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
90
86
let mut block_inner = BlockContext :: new ( ) ;
91
87
* block_inner. base_path_mut ( ) = base_path. to_vec ( ) ;
92
88
93
- // because block is moved here, we need another bool variable to track
94
- // its status for later cleanup
95
89
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.
99
90
rc. push_block ( block_inner) ;
100
91
}
101
92
@@ -143,7 +134,6 @@ pub fn expand_partial<'reg: 'rc, 'rc>(
143
134
let result = partial. render ( r, ctx, rc, out) ;
144
135
145
136
// cleanup
146
-
147
137
let trailing_newline = rc. get_trailine_newline ( ) ;
148
138
149
139
if d. template ( ) . is_some ( ) {
0 commit comments