fix clippy

This commit is contained in:
ManyTheFish 2024-04-15 13:30:41 +02:00
parent eaf113ef34
commit 87a93ba47d
3 changed files with 6 additions and 6 deletions

View File

@ -171,7 +171,7 @@ pub fn extract_vector_points<R: io::Read + io::Seek>(
VectorStateDelta::NowGenerated(prompt.render(
obkv,
DelAdd::Addition,
&new_fields_ids_map,
new_fields_ids_map,
)?)
} else {
VectorStateDelta::NowRemoved
@ -199,9 +199,9 @@ pub fn extract_vector_points<R: io::Read + io::Seek>(
if document_is_kept {
// Don't give up if the old prompt was failing
let old_prompt = prompt
.render(obkv, DelAdd::Deletion, &old_fields_ids_map)
.render(obkv, DelAdd::Deletion, old_fields_ids_map)
.unwrap_or_default();
let new_prompt = prompt.render(obkv, DelAdd::Addition, &new_fields_ids_map)?;
let new_prompt = prompt.render(obkv, DelAdd::Addition, new_fields_ids_map)?;
if old_prompt != new_prompt {
tracing::trace!(
"🚀 Changing prompt from\n{old_prompt}\n===to===\n{new_prompt}"

View File

@ -807,7 +807,7 @@ impl<'a, 'i> Transform<'a, 'i> {
fst_new_external_documents_ids_builder.insert(key, value)
})?;
let old_inner_settings = InnerIndexSettings::from_index(&self.index, wtxn)?;
let old_inner_settings = InnerIndexSettings::from_index(self.index, wtxn)?;
let mut new_inner_settings = old_inner_settings.clone();
new_inner_settings.fields_ids_map = self.fields_ids_map;
let settings_diff = InnerIndexSettingsDiff {

View File

@ -1044,7 +1044,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
{
self.index.set_updated_at(self.wtxn, &OffsetDateTime::now_utc())?;
let old_inner_settings = InnerIndexSettings::from_index(&self.index, &self.wtxn)?;
let old_inner_settings = InnerIndexSettings::from_index(self.index, self.wtxn)?;
// never trigger re-indexing
self.update_displayed()?;
@ -1078,7 +1078,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
// 3. Keep the old vectors but reattempt indexing on a prompt change: only actually changed prompt will need embedding + storage
let embedding_configs_updated = self.update_embedding_configs()?;
let new_inner_settings = InnerIndexSettings::from_index(&self.index, &self.wtxn)?;
let new_inner_settings = InnerIndexSettings::from_index(self.index, self.wtxn)?;
let inner_settings_diff = InnerIndexSettingsDiff {
old: old_inner_settings,
new: new_inner_settings,