mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-11-22 04:36:32 +00:00
Make clippy happy
This commit is contained in:
@@ -65,6 +65,7 @@ impl<'extractor> WordDocidsBalancedCaches<'extractor> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn insert_add_u32(
|
||||
&mut self,
|
||||
field_id: FieldId,
|
||||
@@ -116,6 +117,7 @@ impl<'extractor> WordDocidsBalancedCaches<'extractor> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn insert_del_u32(
|
||||
&mut self,
|
||||
field_id: FieldId,
|
||||
@@ -650,7 +652,7 @@ impl SettingsChangeWordDocidsExtractors {
|
||||
PatternMatch::Match
|
||||
// If any old or new field is searchable then we need to iterate over all fields
|
||||
// else if any field matches we need to iterate over all fields
|
||||
} else if old_searchable.zip(new_searchable).map_or(true, |(old, new)| {
|
||||
} else if old_searchable.zip(new_searchable).is_none_or(|(old, new)| {
|
||||
old.iter().chain(new).any(|attr| {
|
||||
match_field_legacy(attr, field_name) == PatternMatch::Parent
|
||||
})
|
||||
@@ -663,7 +665,7 @@ impl SettingsChangeWordDocidsExtractors {
|
||||
ActionToOperate::IndexAddedFields => {
|
||||
let has_searchable_children =
|
||||
|field_name: &str, searchable: Option<&Vec<String>>| {
|
||||
searchable.map_or(true, |fields| {
|
||||
searchable.is_none_or(|fields| {
|
||||
fields.iter().any(|attr| {
|
||||
match_field_legacy(attr, field_name) != PatternMatch::Parent
|
||||
})
|
||||
|
||||
@@ -390,7 +390,7 @@ where
|
||||
extractor_allocs,
|
||||
)?;
|
||||
|
||||
'word_docids: {
|
||||
'_word_docids: {
|
||||
let WordDocidsCaches {
|
||||
word_docids,
|
||||
word_fid_docids,
|
||||
|
||||
@@ -2064,7 +2064,7 @@ impl InnerIndexSettings {
|
||||
let asc_desc_fields = index.asc_desc_fields(rtxn)?;
|
||||
let distinct_field = index.distinct_field(rtxn)?.map(|f| f.to_string());
|
||||
let user_defined_searchable_attributes = match index.user_defined_searchable_fields(rtxn)? {
|
||||
Some(fields) if fields.iter().any(|&f| f == "*") => None,
|
||||
Some(fields) if fields.contains(&"*") => None,
|
||||
Some(fields) => Some(fields.into_iter().map(|f| f.to_string()).collect()),
|
||||
None => None,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user