File tree 1 file changed +3
-7
lines changed 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -108,19 +108,15 @@ where
108
108
fn build_specialization_forest ( & self ) -> Result < Graph < ImplId < I > , ( ) > , CoherenceError < I > > {
109
109
let mut forest = DiGraph :: new ( ) ;
110
110
111
- let node_impls: Vec < ImplId < _ > > = forest. raw_nodes ( ) . iter ( ) . map ( |x| x. weight ) . collect ( ) ;
112
-
113
111
// Find all specializations (implemented in coherence/solve)
114
112
// Record them in the forest by adding an edge from the less special
115
113
// to the more special.
116
114
self . visit_specializations_of_trait ( |less_special, more_special| {
117
115
// Check so that we never add multiple nodes with the same ImplId.
118
- if !node_impls. contains ( & less_special) && !node_impls. contains ( & more_special) {
119
- let l = forest. add_node ( less_special) ;
120
- let m = forest. add_node ( more_special) ;
116
+ let l = forest. add_node ( less_special) ;
117
+ let m = forest. add_node ( more_special) ;
121
118
122
- forest. add_edge ( l, m, ( ) ) ;
123
- }
119
+ forest. update_edge ( l, m, ( ) ) ;
124
120
} ) ?;
125
121
126
122
Ok ( forest)
You can’t perform that action at this time.
0 commit comments