Skip to content

Commit a9a3b99

Browse files
committed
fix
1 parent 56e0800 commit a9a3b99

File tree

2 files changed

+211
-235
lines changed

2 files changed

+211
-235
lines changed

src/jsonpath/selector.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ use crate::core::JsonbItem;
2222
use crate::core::JsonbItemType;
2323
use crate::core::ObjectValueIterator;
2424
use crate::error::Result;
25-
use crate::jsonpath::ArithmeticFunc;
2625
use crate::jsonpath::ArrayIndex;
27-
use crate::jsonpath::BinaryArithmeticOperator;
2826
use crate::jsonpath::BinaryOperator;
2927
use crate::jsonpath::Expr;
3028
use crate::jsonpath::JsonPath;
@@ -617,7 +615,7 @@ impl<'a> Selector<'a> {
617615
fn eval_expr(&mut self, item: JsonbItem<'a>, expr: &'a Expr<'a>) -> Result<()> {
618616
match expr {
619617
Expr::UnaryOp { op, operand } => {
620-
let res_items = self.eval_unary_arithmetic_func(item.clone(), &op, &operand)?;
618+
let res_items = self.eval_unary_arithmetic_func(item.clone(), op, operand)?;
621619
for res_item in res_items {
622620
self.items.push_back(res_item);
623621
}
@@ -629,7 +627,7 @@ impl<'a> Selector<'a> {
629627
| BinaryOperator::Divide
630628
| BinaryOperator::Modulo => {
631629
let res_items =
632-
self.eval_binary_arithmetic_func(item.clone(), &op, &left, right)?;
630+
self.eval_binary_arithmetic_func(item.clone(), op, left, right)?;
633631
for res_item in res_items {
634632
self.items.push_back(res_item);
635633
}

0 commit comments

Comments
 (0)