From 0d28404aad4acd5a416a5182fb6363771ccff3da Mon Sep 17 00:00:00 2001 From: Nicolas Luck Date: Thu, 27 Jul 2023 11:50:38 +0200 Subject: [PATCH] Add special case when parsing --- src/machine/parsed_results.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/machine/parsed_results.rs b/src/machine/parsed_results.rs index ba33089d..ecb58c1c 100644 --- a/src/machine/parsed_results.rs +++ b/src/machine/parsed_results.rs @@ -66,6 +66,18 @@ impl From> for QueryResolution { } } + // If there is only one line, and it is an empty match, return true. + if query_result_lines.len() == 1 { + match query_result_lines[0].clone() { + QueryResolutionLine::Match(m) => { + if m.is_empty() { + return QueryResolution::True; + } + } + _ => {} + } + } + // If there is at least one line with true and no matches, return true. if query_result_lines .iter() -- 2.54.0