This commit is contained in:
Paul Masurel
2022-08-20 13:01:33 +02:00
committed by GitHub
parent ce45889add
commit 4a3169011d
5 changed files with 10 additions and 6 deletions

View File

@@ -184,7 +184,7 @@ pub struct QueryParser {
fn all_negative(ast: &LogicalAst) -> bool {
match ast {
LogicalAst::Leaf(_) => false,
LogicalAst::Boost(ref child_ast, _) => all_negative(&*child_ast),
LogicalAst::Boost(ref child_ast, _) => all_negative(child_ast),
LogicalAst::Clause(children) => children
.iter()
.all(|(ref occur, child)| (*occur == Occur::MustNot) || all_negative(child)),