Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
imalsogreg committed Nov 22, 2024
1 parent 833c55a commit ae713eb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions engine/baml-lib/baml-core/src/ir/jinja_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ pub fn evaluate_predicate(
predicate_expression: &JinjaExpression,
) -> Result<bool, anyhow::Error> {
let ctx: HashMap<String, minijinja::Value> =
[("this".to_string(), minijinja::Value::from_serialize(this))]
.into_iter()
.collect();
HashMap::from([("this".to_string(), minijinja::Value::from_serialize(this))]);
match render_expression(&predicate_expression, &ctx)?.as_ref() {
"true" => Ok(true),
"false" => Ok(false),
Expand Down

0 comments on commit ae713eb

Please sign in to comment.