From fc242f6e1f88c332db843a8d6af667a59ad6ea6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 22 Nov 2020 15:40:11 +0100 Subject: [PATCH] Rewrite the FacetCondtion Debug impl in a defensive way --- src/search/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/search/mod.rs b/src/search/mod.rs index 7020fa838..af6ccaf26 100644 --- a/src/search/mod.rs +++ b/src/search/mod.rs @@ -210,11 +210,12 @@ impl<'a> Search<'a> { impl fmt::Debug for Search<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let Search { query, facet_condition, offset, limit, rtxn: _, index: _ } = self; f.debug_struct("Search") - .field("query", &self.query) - .field("facet_condition", &self.facet_condition) - .field("offset", &self.offset) - .field("limit", &self.limit) + .field("query", query) + .field("facet_condition", facet_condition) + .field("offset", offset) + .field("limit", limit) .finish() } }