mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Make clippy happy
This commit is contained in:
parent
5bab8cf7ec
commit
4fb47492e5
@ -86,7 +86,7 @@ impl Settings {
|
|||||||
Ok(stop_words.stream().into_strs()?.into_iter().collect())
|
Ok(stop_words.stream().into_strs()?.into_iter().collect())
|
||||||
})
|
})
|
||||||
.transpose()?
|
.transpose()?
|
||||||
.unwrap_or_else(Vec::new);
|
.unwrap_or_default();
|
||||||
let distinct_field = index.distinct_field(&txn)?.map(String::from);
|
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
|
// in milli each word in the synonyms map were split on their separator. Since we lost
|
||||||
@ -103,8 +103,8 @@ impl Settings {
|
|||||||
|
|
||||||
println!(
|
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:\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"),
|
displayed_attributes.unwrap_or_else(|| vec!["*".to_owned()]).join("\n\t"),
|
||||||
searchable_attributes.unwrap_or(vec!["*".to_owned()]).join("\n\t"),
|
searchable_attributes.unwrap_or_else(|| vec!["*".to_owned()]).join("\n\t"),
|
||||||
filterable_attributes.join("\n\t"),
|
filterable_attributes.join("\n\t"),
|
||||||
sortable_attributes.join("\n\t"),
|
sortable_attributes.join("\n\t"),
|
||||||
criteria.join("\n\t"),
|
criteria.join("\n\t"),
|
||||||
|
@ -33,7 +33,7 @@ pub const DEFAULT_CROP_MARKER: fn() -> String = || "…".to_string();
|
|||||||
pub const DEFAULT_HIGHLIGHT_PRE_TAG: fn() -> String = || "<em>".to_string();
|
pub const DEFAULT_HIGHLIGHT_PRE_TAG: fn() -> String = || "<em>".to_string();
|
||||||
pub const DEFAULT_HIGHLIGHT_POST_TAG: fn() -> String = || "</em>".to_string();
|
pub const DEFAULT_HIGHLIGHT_POST_TAG: fn() -> String = || "</em>".to_string();
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default, PartialEq, DeserializeFromValue)]
|
#[derive(Debug, Clone, Default, PartialEq, Eq, DeserializeFromValue)]
|
||||||
#[deserr(rename_all = camelCase, deny_unknown_fields)]
|
#[deserr(rename_all = camelCase, deny_unknown_fields)]
|
||||||
pub struct SearchQuery {
|
pub struct SearchQuery {
|
||||||
pub q: Option<String>,
|
pub q: Option<String>,
|
||||||
|
Loading…
Reference in New Issue
Block a user