Cleanup a few clones (#7681)

This commit is contained in:
Arnaud Gourlay
2025-12-03 13:53:17 +01:00
committed by GitHub
parent d523d9fb99
commit e01babffab
5 changed files with 8 additions and 9 deletions

View File

@@ -206,7 +206,7 @@ impl ShardCleanTask {
ShardCleanTask {
handle: task,
status: receiver.clone(),
status: receiver,
cancel: cancel.drop_guard(),
}
}

View File

@@ -433,7 +433,6 @@ impl SegmentsSearcher {
.non_appendable_then_appendable_segments()
.map(|segment| {
let handle = runtime_handle.spawn_blocking({
let segment = segment.clone();
let arc_ctx = arc_ctx.clone();
let hw_counter = hw_measurement_acc.get_counter_cell();
move || {

View File

@@ -793,8 +793,8 @@ impl UpdateHandler {
&segments,
op_num,
operation,
update_operation_lock.clone(),
update_tracker.clone(),
update_operation_lock,
update_tracker,
&hw_measurements.get_counter_cell(),
);

View File

@@ -131,7 +131,7 @@ impl SegmentEntry for ProxySegment {
.wrapped_segment
.get()
.read()
.rescore_with_formula(formula_ctx.clone(), hw_counter)?;
.rescore_with_formula(formula_ctx, hw_counter)?;
let result = {
if self.deleted_points.is_empty() {
@@ -716,7 +716,7 @@ impl SegmentEntry for ProxySegment {
// Store index change to later propagate to optimized/wrapped segment
self.changed_indexes
.insert(key.clone(), ProxyIndexChange::Create(field_schema, op_num));
.insert(key, ProxyIndexChange::Create(field_schema, op_num));
Ok(true)
}

View File

@@ -47,7 +47,7 @@ impl From<InferenceData> for InferenceInput {
InferenceInput {
data: Value::String(text),
data_type: InferenceDataType::Text,
model: model.clone(),
model,
options: options.map(DocumentOptions::into_options),
}
}
@@ -60,7 +60,7 @@ impl From<InferenceData> for InferenceInput {
InferenceInput {
data: image,
data_type: InferenceDataType::Image,
model: model.clone(),
model,
options: options.options,
}
}
@@ -73,7 +73,7 @@ impl From<InferenceData> for InferenceInput {
InferenceInput {
data: object,
data_type: InferenceDataType::Object,
model: model.clone(),
model,
options: options.options,
}
}