constants.iter().map(|(c, ptr)| {
functor!(
atom!(":"),
- [cell((c.clone())), indexing_code_ptr((*ptr))]
+ [cell((*c)), indexing_code_ptr((*ptr))]
)
}),
)
let functor = variadic_functor(
atom!("switch_on_constants"),
1,
- constants.iter().map(|(c, ptr)| {
- functor!(atom!(":"), [cell((c.clone())), indexing_code_ptr((*ptr))])
- }),
+ constants
+ .iter()
+ .map(|(c, ptr)| functor!(atom!(":"), [cell((*c)), indexing_code_ptr((*ptr))])),
);
heap.truncate(0);
);
retraction_info.push_record(RetractionRecord::AddedIndex(
- skeleton[clause_index].opt_arg_index_key.clone(),
+ skeleton[clause_index].opt_arg_index_key,
clause_loc,
));
} else {
// appear anywhere inside an Internal record.
retraction_info.push_record(RetractionRecord::RemovedIndex(
index_loc,
- opt_arg_index_key.clone(),
+ *opt_arg_index_key,
offset,
));
}
skeleton.clauses[0].clause_start = clause_loc + 2;
retraction_info.push_record(RetractionRecord::AddedIndex(
- skeleton.clauses[0].opt_arg_index_key.clone(),
+ skeleton.clauses[0].opt_arg_index_key,
skeleton.clauses[0].clause_start,
));
skeleton.clauses[target_pos].opt_arg_index_key += index_loc - 1;
retraction_info.push_record(RetractionRecord::AddedIndex(
- skeleton.clauses[target_pos].opt_arg_index_key.clone(),
+ skeleton.clauses[target_pos].opt_arg_index_key,
skeleton.clauses[target_pos].clause_start,
));