From 1c6c89f34561c62a05b1f4575e9b6f2c060a579f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 Dec 2021 11:50:12 +0100 Subject: [PATCH] Fix the binaries that use the new optional filters --- cli/src/main.rs | 5 +++-- http-ui/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 44c197de6..b3c18244d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -250,8 +250,9 @@ impl Search { } if let Some(ref filter) = self.filter { - let condition = milli::Filter::from_str(filter)?; - search.filter(condition); + if let Some(condition) = milli::Filter::from_str(filter)? { + search.filter(condition); + } } if let Some(offset) = self.offset { diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index 4bd8815a5..75a9012c6 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -738,7 +738,7 @@ async fn main() -> anyhow::Result<()> { let filters = match query.filters.as_ref() { Some(condition) if !condition.trim().is_empty() => { - Some(MilliFilter::from_str(condition).unwrap()) + MilliFilter::from_str(condition).unwrap() } _otherwise => None, };