diff --git a/cli/src/main.rs b/cli/src/main.rs
index 09ee7f984..fb4d41ee2 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -86,7 +86,7 @@ impl Settings {
Ok(stop_words.stream().into_strs()?.into_iter().collect())
})
.transpose()?
- .unwrap_or_else(Vec::new);
+ .unwrap_or_default();
let distinct_field = index.distinct_field(&txn)?.map(String::from);
// in milli each word in the synonyms map were split on their separator. Since we lost
@@ -103,8 +103,8 @@ impl Settings {
println!(
"displayed attributes:\n\t{}\nsearchable attributes:\n\t{}\nfilterable attributes:\n\t{}\nsortable attributes:\n\t{}\ncriterion:\n\t{}\nstop words:\n\t{}\ndistinct fields:\n\t{}\nsynonyms:\n\t{}\nexact attributes:\n\t{}\n",
- displayed_attributes.unwrap_or(vec!["*".to_owned()]).join("\n\t"),
- searchable_attributes.unwrap_or(vec!["*".to_owned()]).join("\n\t"),
+ displayed_attributes.unwrap_or_else(|| vec!["*".to_owned()]).join("\n\t"),
+ searchable_attributes.unwrap_or_else(|| vec!["*".to_owned()]).join("\n\t"),
filterable_attributes.join("\n\t"),
sortable_attributes.join("\n\t"),
criteria.join("\n\t"),
diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs
index cd6dc6e30..5044bd611 100644
--- a/meilisearch/src/search.rs
+++ b/meilisearch/src/search.rs
@@ -33,7 +33,7 @@ pub const DEFAULT_CROP_MARKER: fn() -> String = || "…".to_string();
pub const DEFAULT_HIGHLIGHT_PRE_TAG: fn() -> String = || "".to_string();
pub const DEFAULT_HIGHLIGHT_POST_TAG: fn() -> String = || "".to_string();
-#[derive(Debug, Clone, Default, PartialEq, DeserializeFromValue)]
+#[derive(Debug, Clone, Default, PartialEq, Eq, DeserializeFromValue)]
#[deserr(rename_all = camelCase, deny_unknown_fields)]
pub struct SearchQuery {
pub q: Option,