Fixes || evaluation when all alternatives are false

It should return false and not fail...
pull/545/head
Tpt 2 years ago committed by Thomas Tanon
parent f23ef514e4
commit acf83d4a31
  1. 2
      lib/src/sparql/eval.rs

@ -959,7 +959,7 @@ impl SimpleEvaluator {
.map(|i| self.expression_evaluator(i, stat_children)) .map(|i| self.expression_evaluator(i, stat_children))
.collect::<Rc<[_]>>(); .collect::<Rc<[_]>>();
Rc::new(move |tuple| { Rc::new(move |tuple| {
let mut error = true; let mut error = false;
for child in children.iter() { for child in children.iter() {
match child(tuple).and_then(|v| to_bool(&v)) { match child(tuple).and_then(|v| to_bool(&v)) {
Some(true) => return Some(true.into()), Some(true) => return Some(true.into()),

Loading…
Cancel
Save