mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 22:14:32 +01:00
Add type annotations to remove compiler error
This commit is contained in:
parent
6f49126223
commit
dea00311b6
@ -99,7 +99,7 @@ only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and undersco
|
|||||||
)]
|
)]
|
||||||
InvalidDocumentId { document_id: Value },
|
InvalidDocumentId { document_id: Value },
|
||||||
#[error("Invalid facet distribution, the fields `{}` are not set as filterable.",
|
#[error("Invalid facet distribution, the fields `{}` are not set as filterable.",
|
||||||
.invalid_facets_name.iter().map(AsRef::as_ref).collect::<Vec<_>>().join(", ")
|
.invalid_facets_name.iter().map(AsRef::as_ref).collect::<Vec<&str>>().join(", ")
|
||||||
)]
|
)]
|
||||||
InvalidFacetsDistribution { invalid_facets_name: BTreeSet<String> },
|
InvalidFacetsDistribution { invalid_facets_name: BTreeSet<String> },
|
||||||
#[error(transparent)]
|
#[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() {
|
match .valid_fields.is_empty() {
|
||||||
true => "This index does not have configured sortable attributes.".to_string(),
|
true => "This index does not have configured sortable attributes.".to_string(),
|
||||||
false => format!("Available sortable attributes are: `{}`.",
|
false => format!("Available sortable attributes are: `{}`.",
|
||||||
valid_fields.iter().map(AsRef::as_ref).collect::<Vec<_>>().join(", ")
|
valid_fields.iter().map(AsRef::as_ref).collect::<Vec<&str>>().join(", ")
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
)]
|
)]
|
||||||
|
@ -45,7 +45,7 @@ impl<'a> Display for FilterError<'a> {
|
|||||||
attribute,
|
attribute,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
let filterables_list = filterable_fields.iter().map(AsRef::as_ref).collect::<Vec<_>>().join(" ");
|
let filterables_list = filterable_fields.iter().map(AsRef::as_ref).collect::<Vec<&str>>().join(" ");
|
||||||
|
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user