Make clippy happy

This commit is contained in:
Clément Renault
2025-11-18 11:32:31 +01:00
parent f387aed600
commit 254094032e
3 changed files with 6 additions and 4 deletions

View File

@@ -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
})

View File

@@ -390,7 +390,7 @@ where
extractor_allocs,
)?;
'word_docids: {
'_word_docids: {
let WordDocidsCaches {
word_docids,
word_fid_docids,

View File

@@ -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,
};