@@ -489,7 +489,7 @@ impl<CTX> HashStable<CTX> for Index {
489
489
490
490
#[ test]
491
491
fn test_one_step ( ) {
492
- let mut relation = TransitiveRelation :: new ( ) ;
492
+ let mut relation = TransitiveRelation :: default ( ) ;
493
493
relation. add ( "a" , "b" ) ;
494
494
relation. add ( "a" , "c" ) ;
495
495
assert ! ( relation. contains( & "a" , & "c" ) ) ;
@@ -500,7 +500,7 @@ fn test_one_step() {
500
500
501
501
#[ test]
502
502
fn test_many_steps ( ) {
503
- let mut relation = TransitiveRelation :: new ( ) ;
503
+ let mut relation = TransitiveRelation :: default ( ) ;
504
504
relation. add ( "a" , "b" ) ;
505
505
relation. add ( "a" , "c" ) ;
506
506
relation. add ( "a" , "f" ) ;
@@ -530,7 +530,7 @@ fn mubs_triangle() {
530
530
// ^
531
531
// |
532
532
// b
533
- let mut relation = TransitiveRelation :: new ( ) ;
533
+ let mut relation = TransitiveRelation :: default ( ) ;
534
534
relation. add ( "a" , "tcx" ) ;
535
535
relation. add ( "b" , "tcx" ) ;
536
536
assert_eq ! ( relation. minimal_upper_bounds( & "a" , & "b" ) , vec![ & "tcx" ] ) ;
@@ -551,7 +551,7 @@ fn mubs_best_choice1() {
551
551
// need the second pare down call to get the right result (after
552
552
// intersection, we have [1, 2], but 2 -> 1).
553
553
554
- let mut relation = TransitiveRelation :: new ( ) ;
554
+ let mut relation = TransitiveRelation :: default ( ) ;
555
555
relation. add ( "0" , "1" ) ;
556
556
relation. add ( "0" , "2" ) ;
557
557
@@ -578,7 +578,7 @@ fn mubs_best_choice2() {
578
578
// Like the precedecing test, but in this case intersection is [2,
579
579
// 1], and hence we rely on the first pare down call.
580
580
581
- let mut relation = TransitiveRelation :: new ( ) ;
581
+ let mut relation = TransitiveRelation :: default ( ) ;
582
582
relation. add ( "0" , "1" ) ;
583
583
relation. add ( "0" , "2" ) ;
584
584
@@ -597,7 +597,7 @@ fn mubs_best_choice2() {
597
597
fn mubs_no_best_choice ( ) {
598
598
// in this case, the intersection yields [1, 2], and the "pare
599
599
// down" calls find nothing to remove.
600
- let mut relation = TransitiveRelation :: new ( ) ;
600
+ let mut relation = TransitiveRelation :: default ( ) ;
601
601
relation. add ( "0" , "1" ) ;
602
602
relation. add ( "0" , "2" ) ;
603
603
@@ -614,7 +614,7 @@ fn mubs_best_choice_scc() {
614
614
// in this case, 1 and 2 form a cycle; we pick arbitrarily (but
615
615
// consistently).
616
616
617
- let mut relation = TransitiveRelation :: new ( ) ;
617
+ let mut relation = TransitiveRelation :: default ( ) ;
618
618
relation. add ( "0" , "1" ) ;
619
619
relation. add ( "0" , "2" ) ;
620
620
@@ -636,7 +636,7 @@ fn pdub_crisscross() {
636
636
// /\ |
637
637
// b -> b1 ---+
638
638
639
- let mut relation = TransitiveRelation :: new ( ) ;
639
+ let mut relation = TransitiveRelation :: default ( ) ;
640
640
relation. add ( "a" , "a1" ) ;
641
641
relation. add ( "a" , "b1" ) ;
642
642
relation. add ( "b" , "a1" ) ;
@@ -659,7 +659,7 @@ fn pdub_crisscross_more() {
659
659
// /\ /\ |
660
660
// b -> b1 -> b2 ---------+
661
661
662
- let mut relation = TransitiveRelation :: new ( ) ;
662
+ let mut relation = TransitiveRelation :: default ( ) ;
663
663
relation. add ( "a" , "a1" ) ;
664
664
relation. add ( "a" , "b1" ) ;
665
665
relation. add ( "b" , "a1" ) ;
@@ -692,7 +692,7 @@ fn pdub_lub() {
692
692
// |
693
693
// b -> b1 ---+
694
694
695
- let mut relation = TransitiveRelation :: new ( ) ;
695
+ let mut relation = TransitiveRelation :: default ( ) ;
696
696
relation. add ( "a" , "a1" ) ;
697
697
relation. add ( "b" , "b1" ) ;
698
698
relation. add ( "a1" , "x" ) ;
@@ -715,7 +715,7 @@ fn mubs_intermediate_node_on_one_side_only() {
715
715
// b
716
716
717
717
// "digraph { a -> c -> d; b -> d; }",
718
- let mut relation = TransitiveRelation :: new ( ) ;
718
+ let mut relation = TransitiveRelation :: default ( ) ;
719
719
relation. add ( "a" , "c" ) ;
720
720
relation. add ( "c" , "d" ) ;
721
721
relation. add ( "b" , "d" ) ;
@@ -734,7 +734,7 @@ fn mubs_scc_1() {
734
734
// b
735
735
736
736
// "digraph { a -> c -> d; d -> c; a -> d; b -> d; }",
737
- let mut relation = TransitiveRelation :: new ( ) ;
737
+ let mut relation = TransitiveRelation :: default ( ) ;
738
738
relation. add ( "a" , "c" ) ;
739
739
relation. add ( "c" , "d" ) ;
740
740
relation. add ( "d" , "c" ) ;
@@ -754,7 +754,7 @@ fn mubs_scc_2() {
754
754
// +--- b
755
755
756
756
// "digraph { a -> c -> d; d -> c; b -> d; b -> c; }",
757
- let mut relation = TransitiveRelation :: new ( ) ;
757
+ let mut relation = TransitiveRelation :: default ( ) ;
758
758
relation. add ( "a" , "c" ) ;
759
759
relation. add ( "c" , "d" ) ;
760
760
relation. add ( "d" , "c" ) ;
@@ -774,7 +774,7 @@ fn mubs_scc_3() {
774
774
// b ---+
775
775
776
776
// "digraph { a -> c -> d -> e -> c; b -> d; b -> e; }",
777
- let mut relation = TransitiveRelation :: new ( ) ;
777
+ let mut relation = TransitiveRelation :: default ( ) ;
778
778
relation. add ( "a" , "c" ) ;
779
779
relation. add ( "c" , "d" ) ;
780
780
relation. add ( "d" , "e" ) ;
@@ -796,7 +796,7 @@ fn mubs_scc_4() {
796
796
// b ---+
797
797
798
798
// "digraph { a -> c -> d -> e -> c; a -> d; b -> e; }"
799
- let mut relation = TransitiveRelation :: new ( ) ;
799
+ let mut relation = TransitiveRelation :: default ( ) ;
800
800
relation. add ( "a" , "c" ) ;
801
801
relation. add ( "c" , "d" ) ;
802
802
relation. add ( "d" , "e" ) ;
@@ -834,7 +834,7 @@ fn parent() {
834
834
( 1 , /*->*/ 3 ) ,
835
835
] ;
836
836
837
- let mut relation = TransitiveRelation :: new ( ) ;
837
+ let mut relation = TransitiveRelation :: default ( ) ;
838
838
for ( a, b) in pairs {
839
839
relation. add ( a, b) ;
840
840
}
0 commit comments