Skip to content

Commit 2202ec2

Browse files
committed
some refactoring and code movement
1 parent 64f266d commit 2202ec2

20 files changed

Lines changed: 1928 additions & 2059 deletions

evalexpr/src/flat_node/compile.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ fn compile_special_function<F: EvalexprFloat>(
527527
},
528528
"Map" | "map" => {
529529
let len = node.children.len();
530-
let mut expr = None;
531-
let mut value_name = None;
530+
let expr;
531+
let value_name;
532532
let mut index_name = None;
533533
let mut total_name = None;
534534
match len {
@@ -617,9 +617,9 @@ fn compile_special_function<F: EvalexprFloat>(
617617
compile_to_flat_inner(condition, ops)?;
618618
let l1 = LABEL_ID.fetch_add(1, Ordering::Relaxed);
619619
let l2 = LABEL_ID.fetch_add(1, Ordering::Relaxed);
620-
ops.push(FlatOperator::JumpIfFalse { id: l1 , offset:None});
620+
ops.push(FlatOperator::JumpIfFalse { id: l1, offset: None });
621621
compile_to_flat_inner(true_expr, ops)?;
622-
ops.push(FlatOperator::Jump { id: l2 , offset:None});
622+
ops.push(FlatOperator::Jump { id: l2, offset: None });
623623
ops.push(FlatOperator::Label { id: l1 });
624624
ops.push(FlatOperator::PushConst { value: Value::Empty });
625625
ops.push(FlatOperator::Label { id: l2 });
@@ -640,9 +640,9 @@ fn compile_special_function<F: EvalexprFloat>(
640640
compile_to_flat_inner(condition, ops)?;
641641
let l1 = LABEL_ID.fetch_add(1, Ordering::Relaxed);
642642
let l2 = LABEL_ID.fetch_add(1, Ordering::Relaxed);
643-
ops.push(FlatOperator::JumpIfFalse { id: l1 , offset:None});
643+
ops.push(FlatOperator::JumpIfFalse { id: l1, offset: None });
644644
compile_to_flat_inner(true_expr, ops)?;
645-
ops.push(FlatOperator::Jump { id: l2 , offset:None});
645+
ops.push(FlatOperator::Jump { id: l2, offset: None });
646646
ops.push(FlatOperator::Label { id: l1 });
647647
compile_to_flat_inner(false_expr, ops)?;
648648
ops.push(FlatOperator::Label { id: l2 });

0 commit comments

Comments
 (0)