From dea00311b681316caf441b3d4718c6d0e297f504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Tue, 16 Aug 2022 09:19:17 +0200 Subject: [PATCH] Add type annotations to remove compiler error --- milli/src/error.rs | 4 ++-- milli/src/search/facet/filter.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/milli/src/error.rs b/milli/src/error.rs index 80c923bd9..c817f64fa 100644 --- a/milli/src/error.rs +++ b/milli/src/error.rs @@ -99,7 +99,7 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco )] InvalidDocumentId { document_id: Value }, #[error("Invalid facet distribution, the fields `{}` are not set as filterable.", - .invalid_facets_name.iter().map(AsRef::as_ref).collect::>().join(", ") + .invalid_facets_name.iter().map(AsRef::as_ref).collect::>().join(", ") )] InvalidFacetsDistribution { invalid_facets_name: BTreeSet }, #[error(transparent)] @@ -111,7 +111,7 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco match .valid_fields.is_empty() { true => "This index does not have configured sortable attributes.".to_string(), false => format!("Available sortable attributes are: `{}`.", - valid_fields.iter().map(AsRef::as_ref).collect::>().join(", ") + valid_fields.iter().map(AsRef::as_ref).collect::>().join(", ") ), } )] diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index 225d3ea8d..90aab826a 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -45,7 +45,7 @@ impl<'a> Display for FilterError<'a> { attribute, ) } else { - let filterables_list = filterable_fields.iter().map(AsRef::as_ref).collect::>().join(" "); + let filterables_list = filterable_fields.iter().map(AsRef::as_ref).collect::>().join(" "); write!( f,