"fix" last warnings

This commit is contained in:
Louis Dureuil 2024-11-20 14:03:52 +01:00
parent 7cb8732b45
commit cae8c89467
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -204,7 +204,7 @@ fn merge_btreesets(
result.extend(add);
}
/// TODO remove allocation
// TODO remove allocation
let result = SerdeJson::bytes_encode(&result).map_err(heed::Error::Encoding)?.into_owned();
if Some(result.as_ref()) == current {
Ok(Operation::Ignore)

View File

@ -133,7 +133,6 @@ fn extract_addition_payload_changes<'r, 'pl: 'r>(
) -> Result<hashbrown::HashMap<&'pl str, PayloadOperations<'pl>>> {
let mut new_docids_version_offsets = hashbrown::HashMap::<&str, PayloadOperations<'pl>>::new();
/// TODO manage the error
let mut previous_offset = 0;
let mut iter = Deserializer::from_slice(payload).into_iter::<&RawValue>();
while let Some(doc) = iter.next().transpose().map_err(InternalError::SerdeJson)? {
@ -160,6 +159,7 @@ fn extract_addition_payload_changes<'r, 'pl: 'r>(
primary_key.get_or_insert(pk)
} else {
// primary key was retrieved in the first iteration or in a previous payload
primary_key.as_ref().unwrap()
};

View File

@ -26,8 +26,8 @@ impl<I> PartialDump<I> {
concurrent_available_ids: &'index ConcurrentAvailableIds,
primary_key: &'index PrimaryKey,
) -> PartialDumpChanges<'index, I> {
/// Note for future self:
/// - We recommend sending chunks of documents in this `PartialDumpIndexer` we therefore need to create a custom take_while_size method (that doesn't drop items).
// Note for future self:
// - We recommend sending chunks of documents in this `PartialDumpIndexer` we therefore need to create a custom take_while_size method (that doesn't drop items).
PartialDumpChanges { iter: self.iter, concurrent_available_ids, primary_key }
}
}