Skip to content

Commit

Permalink
Bring back error binding top level and resolve a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Nov 6, 2024
1 parent 96b879a commit 816f4c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ minijinja = { path = "../minijinja", default-features = false, features = [
"unstable_machinery",
"multi_template",
"builtins",
"serde",
] }
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
Expand Down
5 changes: 3 additions & 2 deletions minijinja/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ impl<'env> Vm<'env> {

// if we only have two arguments that we pull from the stack, we
// can assign them to a and b. This slightly reduces the amount of
// code bloat generated here.
// code bloat generated here. Same with the error.
let a;
let b;
let mut err;

macro_rules! func_binop {
($method:ident) => {{
Expand All @@ -264,7 +265,7 @@ impl<'env> Vm<'env> {

macro_rules! bail {
($err:expr) => {{
let mut err = $err;
err = $err;
process_err(&mut err, pc, state);
return Err(err);
}};
Expand Down

0 comments on commit 816f4c4

Please sign in to comment.