Skip to content

Commit

Permalink
Clippy lint fix (#35)
Browse files Browse the repository at this point in the history
* fixed clippy

* cargo fmt
  • Loading branch information
ruokun-niu authored Nov 10, 2024
1 parent 0d01653 commit 5abc3da
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions core/src/evaluation/expressions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1805,22 +1805,17 @@ impl ExpressionEvaluator {
}
}

match &expression.map_expression {
Some(map_expression) => {
variables.insert(
expression.item_identifier.to_string().into(),
item.clone(),
);
let local_context =
ExpressionEvaluationContext::new(&variables, context.get_clock());
let item_result = self
.evaluate_expression(&local_context, map_expression)
.await?;
result.push(item_result);
}
None => {
result.push(item);
}
if let Some(map_expression) = &expression.map_expression {
variables
.insert(expression.item_identifier.to_string().into(), item.clone());
let local_context =
ExpressionEvaluationContext::new(&variables, context.get_clock());
let item_result = self
.evaluate_expression(&local_context, map_expression)
.await?;
result.push(item_result);
} else {
result.push(item);
}
}
Ok(VariableValue::List(result))
Expand Down

0 comments on commit 5abc3da

Please sign in to comment.