Skip to content

Commit

Permalink
rename evaluate_with for Expression<Unary>
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-gorules committed Feb 10, 2025
1 parent afb40a3 commit d5c9adb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bindings/python/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ impl PyExpression {
.map(|context| {
let result = match &self.expression {
Either::Left(standard) => standard.evaluate_with(context, &mut vm),
Either::Right(unary) => unary.evaluate_in(context, &mut vm).map(Variable::Bool),
Either::Right(unary) => {
unary.evaluate_with(context, &mut vm).map(Variable::Bool)
}
};

match result {
Expand Down
4 changes: 2 additions & 2 deletions core/expression/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ impl Expression<Unary> {

pub fn evaluate(&self, context: Variable) -> Result<bool, IsolateError> {
let mut vm = VM::new();
self.evaluate_in(context, &mut vm)
self.evaluate_with(context, &mut vm)
}

pub fn evaluate_in(&self, context: Variable, vm: &mut VM) -> Result<bool, IsolateError> {
pub fn evaluate_with(&self, context: Variable, vm: &mut VM) -> Result<bool, IsolateError> {
let Some(context_object_ref) = context.as_object() else {
return Err(IsolateError::MissingContextReference);
};
Expand Down

0 comments on commit d5c9adb

Please sign in to comment.