diff --git a/pumpkin-solver/src/engine/conflict_analysis/conflict_analysis_context.rs b/pumpkin-solver/src/engine/conflict_analysis/conflict_analysis_context.rs index b03341f2..8cf19bf5 100644 --- a/pumpkin-solver/src/engine/conflict_analysis/conflict_analysis_context.rs +++ b/pumpkin-solver/src/engine/conflict_analysis/conflict_analysis_context.rs @@ -27,10 +27,10 @@ use crate::variables::DomainId; /// Used during conflict analysis to provide the necessary information. /// /// All fields are made public for the time being for simplicity. In the future that may change. -pub(crate) struct ConflictAnalysisContext<'a, 'reasons> { +pub(crate) struct ConflictAnalysisContext<'a> { pub(crate) assignments: &'a mut Assignments, pub(crate) solver_state: &'a mut CSPSolverState, - pub(crate) reason_store: &'reasons mut ReasonStore, + pub(crate) reason_store: &'a mut ReasonStore, pub(crate) brancher: &'a mut dyn Brancher, pub(crate) propagators: &'a mut PropagatorStore, pub(crate) semantic_minimiser: &'a mut SemanticMinimiser, @@ -50,13 +50,13 @@ pub(crate) struct ConflictAnalysisContext<'a, 'reasons> { pub(crate) unit_nogood_step_ids: &'a HashMap, } -impl Debug for ConflictAnalysisContext<'_, '_> { +impl Debug for ConflictAnalysisContext<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct(std::any::type_name::()).finish() } } -impl<'reasons> ConflictAnalysisContext<'_, 'reasons> { +impl<'a> ConflictAnalysisContext<'a> { /// Returns the last decision which was made by the solver. pub(crate) fn find_last_decision(&mut self) -> Option { self.assignments.find_last_decision() @@ -133,11 +133,11 @@ impl<'reasons> ConflictAnalysisContext<'_, 'reasons> { predicate: Predicate, assignments: &Assignments, current_nogood: CurrentNogood<'_>, - reason_store: &'reasons mut ReasonStore, - propagators: &'reasons mut PropagatorStore, + reason_store: &'a mut ReasonStore, + propagators: &'a mut PropagatorStore, proof_log: &mut ProofLog, unit_nogood_step_ids: &HashMap, - ) -> &'reasons [Predicate] { + ) -> &'a [Predicate] { // TODO: this function could be put into the reason store // Note that this function can only be called with propagations, and never decision