@@ -172,7 +172,7 @@ impl<DP: DependencyProvider> State<DP> {
172172 self . build_derivation_tree ( terminal_incompat_id)
173173 } ) ?;
174174 for ( p, _) in self . incompatibility_store [ root_cause] . iter ( ) {
175- * self . conflict_count . entry ( * p) . or_default ( ) += 1 ;
175+ * self . conflict_count . entry ( p) . or_default ( ) += 1 ;
176176 }
177177 self . unit_propagation_buffer . clear ( ) ;
178178 self . unit_propagation_buffer . push ( package_almost) ;
@@ -207,34 +207,38 @@ impl<DP: DependencyProvider> State<DP> {
207207 . is_terminal ( self . root_package , & self . root_version )
208208 {
209209 return Err ( current_incompat_id) ;
210- } else {
211- let ( package, satisfier_search_result) = self . partial_solution . satisfier_search (
212- & self . incompatibility_store [ current_incompat_id] ,
213- & self . incompatibility_store ,
214- ) ;
215- match satisfier_search_result {
216- SatisfierSearch :: DifferentDecisionLevels {
210+ }
211+ let ( package, satisfier_search_result) = self . partial_solution . satisfier_search (
212+ & self . incompatibility_store [ current_incompat_id] ,
213+ & self . incompatibility_store ,
214+ ) ;
215+ match satisfier_search_result {
216+ SatisfierSearch :: DifferentDecisionLevels {
217+ previous_satisfier_level,
218+ } => {
219+ self . backtrack (
220+ current_incompat_id,
221+ current_incompat_changed,
217222 previous_satisfier_level,
218- } => {
219- self . backtrack (
220- current_incompat_id,
221- current_incompat_changed,
222- previous_satisfier_level,
223- ) ;
224- log:: info!( "backtrack to {:?}" , previous_satisfier_level) ;
225- return Ok ( ( package, current_incompat_id) ) ;
226- }
227- SatisfierSearch :: SameDecisionLevels { satisfier_cause } => {
228- let prior_cause = Incompatibility :: prior_cause (
229- current_incompat_id,
230- satisfier_cause,
231- package,
232- & self . incompatibility_store ,
233- ) ;
234- log:: info!( "prior cause: {}" , prior_cause. display( & self . package_store) ) ;
235- current_incompat_id = self . incompatibility_store . alloc ( prior_cause) ;
236- current_incompat_changed = true ;
223+ ) ;
224+ log:: info!( "backtrack to {:?}" , previous_satisfier_level) ;
225+ return Ok ( ( package, current_incompat_id) ) ;
226+ }
227+ SatisfierSearch :: SameDecisionLevels { satisfier_cause } => {
228+ let prior_cause = Incompatibility :: prior_cause (
229+ current_incompat_id,
230+ satisfier_cause,
231+ package,
232+ & self . incompatibility_store ,
233+ ) ;
234+
235+ for ( p, _) in prior_cause. iter ( ) {
236+ * self . conflict_count . entry ( p) . or_default ( ) += 1 ;
237237 }
238+
239+ log:: info!( "prior cause: {}" , prior_cause. display( & self . package_store) ) ;
240+ current_incompat_id = self . incompatibility_store . alloc ( prior_cause) ;
241+ current_incompat_changed = true ;
238242 }
239243 }
240244 }
0 commit comments