@@ -489,7 +489,7 @@ impl<CTX> HashStable<CTX> for Index {
489489
490490#[ test]
491491fn test_one_step ( ) {
492- let mut relation = TransitiveRelation :: new ( ) ;
492+ let mut relation = TransitiveRelation :: default ( ) ;
493493 relation. add ( "a" , "b" ) ;
494494 relation. add ( "a" , "c" ) ;
495495 assert ! ( relation. contains( & "a" , & "c" ) ) ;
@@ -500,7 +500,7 @@ fn test_one_step() {
500500
501501#[ test]
502502fn test_many_steps ( ) {
503- let mut relation = TransitiveRelation :: new ( ) ;
503+ let mut relation = TransitiveRelation :: default ( ) ;
504504 relation. add ( "a" , "b" ) ;
505505 relation. add ( "a" , "c" ) ;
506506 relation. add ( "a" , "f" ) ;
@@ -530,7 +530,7 @@ fn mubs_triangle() {
530530 // ^
531531 // |
532532 // b
533- let mut relation = TransitiveRelation :: new ( ) ;
533+ let mut relation = TransitiveRelation :: default ( ) ;
534534 relation. add ( "a" , "tcx" ) ;
535535 relation. add ( "b" , "tcx" ) ;
536536 assert_eq ! ( relation. minimal_upper_bounds( & "a" , & "b" ) , vec![ & "tcx" ] ) ;
@@ -551,7 +551,7 @@ fn mubs_best_choice1() {
551551 // need the second pare down call to get the right result (after
552552 // intersection, we have [1, 2], but 2 -> 1).
553553
554- let mut relation = TransitiveRelation :: new ( ) ;
554+ let mut relation = TransitiveRelation :: default ( ) ;
555555 relation. add ( "0" , "1" ) ;
556556 relation. add ( "0" , "2" ) ;
557557
@@ -578,7 +578,7 @@ fn mubs_best_choice2() {
578578 // Like the precedecing test, but in this case intersection is [2,
579579 // 1], and hence we rely on the first pare down call.
580580
581- let mut relation = TransitiveRelation :: new ( ) ;
581+ let mut relation = TransitiveRelation :: default ( ) ;
582582 relation. add ( "0" , "1" ) ;
583583 relation. add ( "0" , "2" ) ;
584584
@@ -597,7 +597,7 @@ fn mubs_best_choice2() {
597597fn mubs_no_best_choice ( ) {
598598 // in this case, the intersection yields [1, 2], and the "pare
599599 // down" calls find nothing to remove.
600- let mut relation = TransitiveRelation :: new ( ) ;
600+ let mut relation = TransitiveRelation :: default ( ) ;
601601 relation. add ( "0" , "1" ) ;
602602 relation. add ( "0" , "2" ) ;
603603
@@ -614,7 +614,7 @@ fn mubs_best_choice_scc() {
614614 // in this case, 1 and 2 form a cycle; we pick arbitrarily (but
615615 // consistently).
616616
617- let mut relation = TransitiveRelation :: new ( ) ;
617+ let mut relation = TransitiveRelation :: default ( ) ;
618618 relation. add ( "0" , "1" ) ;
619619 relation. add ( "0" , "2" ) ;
620620
@@ -636,7 +636,7 @@ fn pdub_crisscross() {
636636 // /\ |
637637 // b -> b1 ---+
638638
639- let mut relation = TransitiveRelation :: new ( ) ;
639+ let mut relation = TransitiveRelation :: default ( ) ;
640640 relation. add ( "a" , "a1" ) ;
641641 relation. add ( "a" , "b1" ) ;
642642 relation. add ( "b" , "a1" ) ;
@@ -659,7 +659,7 @@ fn pdub_crisscross_more() {
659659 // /\ /\ |
660660 // b -> b1 -> b2 ---------+
661661
662- let mut relation = TransitiveRelation :: new ( ) ;
662+ let mut relation = TransitiveRelation :: default ( ) ;
663663 relation. add ( "a" , "a1" ) ;
664664 relation. add ( "a" , "b1" ) ;
665665 relation. add ( "b" , "a1" ) ;
@@ -692,7 +692,7 @@ fn pdub_lub() {
692692 // |
693693 // b -> b1 ---+
694694
695- let mut relation = TransitiveRelation :: new ( ) ;
695+ let mut relation = TransitiveRelation :: default ( ) ;
696696 relation. add ( "a" , "a1" ) ;
697697 relation. add ( "b" , "b1" ) ;
698698 relation. add ( "a1" , "x" ) ;
@@ -715,7 +715,7 @@ fn mubs_intermediate_node_on_one_side_only() {
715715 // b
716716
717717 // "digraph { a -> c -> d; b -> d; }",
718- let mut relation = TransitiveRelation :: new ( ) ;
718+ let mut relation = TransitiveRelation :: default ( ) ;
719719 relation. add ( "a" , "c" ) ;
720720 relation. add ( "c" , "d" ) ;
721721 relation. add ( "b" , "d" ) ;
@@ -734,7 +734,7 @@ fn mubs_scc_1() {
734734 // b
735735
736736 // "digraph { a -> c -> d; d -> c; a -> d; b -> d; }",
737- let mut relation = TransitiveRelation :: new ( ) ;
737+ let mut relation = TransitiveRelation :: default ( ) ;
738738 relation. add ( "a" , "c" ) ;
739739 relation. add ( "c" , "d" ) ;
740740 relation. add ( "d" , "c" ) ;
@@ -754,7 +754,7 @@ fn mubs_scc_2() {
754754 // +--- b
755755
756756 // "digraph { a -> c -> d; d -> c; b -> d; b -> c; }",
757- let mut relation = TransitiveRelation :: new ( ) ;
757+ let mut relation = TransitiveRelation :: default ( ) ;
758758 relation. add ( "a" , "c" ) ;
759759 relation. add ( "c" , "d" ) ;
760760 relation. add ( "d" , "c" ) ;
@@ -774,7 +774,7 @@ fn mubs_scc_3() {
774774 // b ---+
775775
776776 // "digraph { a -> c -> d -> e -> c; b -> d; b -> e; }",
777- let mut relation = TransitiveRelation :: new ( ) ;
777+ let mut relation = TransitiveRelation :: default ( ) ;
778778 relation. add ( "a" , "c" ) ;
779779 relation. add ( "c" , "d" ) ;
780780 relation. add ( "d" , "e" ) ;
@@ -796,7 +796,7 @@ fn mubs_scc_4() {
796796 // b ---+
797797
798798 // "digraph { a -> c -> d -> e -> c; a -> d; b -> e; }"
799- let mut relation = TransitiveRelation :: new ( ) ;
799+ let mut relation = TransitiveRelation :: default ( ) ;
800800 relation. add ( "a" , "c" ) ;
801801 relation. add ( "c" , "d" ) ;
802802 relation. add ( "d" , "e" ) ;
@@ -834,7 +834,7 @@ fn parent() {
834834 ( 1 , /*->*/ 3 ) ,
835835 ] ;
836836
837- let mut relation = TransitiveRelation :: new ( ) ;
837+ let mut relation = TransitiveRelation :: default ( ) ;
838838 for ( a, b) in pairs {
839839 relation. add ( a, b) ;
840840 }
0 commit comments