@@ -285,7 +285,7 @@ impl<O: ForestObligation> ObligationForest<O> {
285
285
let _ = self . register_obligation_at ( obligation, None ) ;
286
286
}
287
287
288
- // returns Err(()) if we already know this obligation failed.
288
+ // Returns Err(()) if we already know this obligation failed.
289
289
fn register_obligation_at ( & mut self , obligation : O , parent : Option < NodeIndex > )
290
290
-> Result < ( ) , ( ) >
291
291
{
@@ -425,7 +425,7 @@ impl<O: ForestObligation> ObligationForest<O> {
425
425
Some ( NodeIndex :: new ( i) )
426
426
) ;
427
427
if let Err ( ( ) ) = st {
428
- // error already reported - propagate it
428
+ // Error already reported - propagate it
429
429
// to our node.
430
430
self . error_at ( i) ;
431
431
}
@@ -454,8 +454,6 @@ impl<O: ForestObligation> ObligationForest<O> {
454
454
455
455
self . mark_as_waiting ( ) ;
456
456
self . process_cycles ( processor) ;
457
-
458
- // Now we have to compress the result
459
457
let completed = self . compress ( do_completed) ;
460
458
461
459
debug ! ( "process_obligations: complete" ) ;
@@ -516,11 +514,11 @@ impl<O: ForestObligation> ObligationForest<O> {
516
514
node. state . set ( NodeState :: Done ) ;
517
515
} ,
518
516
NodeState :: Waiting | NodeState :: Pending => {
519
- // this node is still reachable from some pending node. We
517
+ // This node is still reachable from some pending node. We
520
518
// will get to it when they are all processed.
521
519
}
522
520
NodeState :: Done | NodeState :: Error => {
523
- // already processed that node
521
+ // Already processed that node.
524
522
}
525
523
} ;
526
524
}
@@ -664,8 +662,7 @@ impl<O: ForestObligation> ObligationForest<O> {
664
662
return if do_completed == DoCompleted :: Yes { Some ( vec ! [ ] ) } else { None } ;
665
663
}
666
664
667
- // Pop off all the nodes we killed and extract the success
668
- // stories.
665
+ // Pop off all the nodes we killed and extract the success stories.
669
666
let successful = if do_completed == DoCompleted :: Yes {
670
667
Some ( ( 0 ..dead_nodes)
671
668
. map ( |_| self . nodes . pop ( ) . unwrap ( ) )
@@ -696,7 +693,6 @@ impl<O: ForestObligation> ObligationForest<O> {
696
693
if let Some ( index) = node. parent {
697
694
let new_i = node_rewrites[ index. index ( ) ] ;
698
695
if new_i >= nodes_len {
699
- // parent dead due to error
700
696
node. parent = None ;
701
697
} else {
702
698
node. parent = Some ( NodeIndex :: new ( new_i) ) ;
@@ -745,7 +741,7 @@ impl<O> Node<O> {
745
741
}
746
742
}
747
743
748
- // I need a Clone closure
744
+ // I need a Clone closure.
749
745
#[ derive( Clone ) ]
750
746
struct GetObligation < ' a , O > ( & ' a [ Node < O > ] ) ;
751
747
0 commit comments