Skip to content

Commit

Permalink
Avoid reserved 'gen' keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Dec 15, 2024
1 parent 298212e commit a866e27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions minijinja/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ impl<'source> Environment<'source> {
fn _compile_expression<'expr>(&self, expr: &'expr str) -> Result<Instructions<'expr>, Error> {
attach_basic_debug_info(
parse_expr(expr).map(|ast| {
let mut gen = CodeGenerator::new("<expression>", expr);
gen.compile_expr(&ast);
gen.finish().0
let mut g = CodeGenerator::new("<expression>", expr);
g.compile_expr(&ast);
g.finish().0
}),
expr,
)
Expand Down
8 changes: 4 additions & 4 deletions minijinja/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ impl<'source> CompiledTemplate<'source> {
config.syntax_config.clone(),
config.ws_config
));
let mut gen = CodeGenerator::new(name, source);
gen.compile_stmt(&ast);
let buffer_size_hint = gen.buffer_size_hint();
let (instructions, blocks) = gen.finish();
let mut g = CodeGenerator::new(name, source);
g.compile_stmt(&ast);
let buffer_size_hint = g.buffer_size_hint();
let (instructions, blocks) = g.finish();
Ok(CompiledTemplate {
instructions,
blocks,
Expand Down

0 comments on commit a866e27

Please sign in to comment.