@@ -709,14 +709,16 @@ mod test {
709709 let inference_1 = TE :: bytes ( Some ( ADDRESS_WIDTH_BITS ) ) ;
710710 let inference_2 = TE :: bytes ( None ) ;
711711 let inference_3 = TE :: address ( ) ;
712- let inferences = vec ! [ inference_1, inference_2, inference_3] ;
712+ let inferences = [ inference_1, inference_2, inference_3] ;
713713 let inference_permutations: Vec < Vec < _ > > =
714714 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
715715
716716 // Check that they combine properly, and produce the same result no matter the
717717 // order
718718 for permutation in inference_permutations {
719- permutation. into_iter ( ) . for_each ( |i| state. infer ( v_1_tv, i. clone ( ) ) ) ;
719+ for i in permutation. into_iter ( ) {
720+ state. infer ( v_1_tv, i. clone ( ) ) ;
721+ }
720722
721723 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
722724 let result = util:: get_inference ( v_1_tv, state. result ( ) ) ;
@@ -742,14 +744,16 @@ mod test {
742744 let inference_1 = TE :: signed_word ( Some ( 64 ) ) ;
743745 let inference_2 = TE :: bytes ( None ) ;
744746 let inference_3 = TE :: signed_word ( None ) ;
745- let inferences = vec ! [ inference_1, inference_2, inference_3] ;
747+ let inferences = [ inference_1, inference_2, inference_3] ;
746748 let inference_permutations: Vec < Vec < _ > > =
747749 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
748750
749751 // Check that they combine properly, and produce the same result no matter the
750752 // order
751753 for permutation in inference_permutations {
752- permutation. into_iter ( ) . for_each ( |i| state. infer ( v_1_tv, i. clone ( ) ) ) ;
754+ for i in permutation. into_iter ( ) {
755+ state. infer ( v_1_tv, i. clone ( ) ) ;
756+ }
753757
754758 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
755759 let result = util:: get_inference ( v_1_tv, state. result ( ) ) ;
@@ -771,14 +775,16 @@ mod test {
771775 // Set up some inferences
772776 let inference_1 = TE :: signed_word ( Some ( 64 ) ) ;
773777 let inference_2 = TE :: signed_word ( Some ( 128 ) ) ;
774- let inferences = vec ! [ inference_1, inference_2] ;
778+ let inferences = [ inference_1, inference_2] ;
775779 let permutations: Vec < Vec < _ > > =
776780 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
777781
778782 // Check that they combine properly, and produce the same error no matter the
779783 // order
780784 for permutation in permutations {
781- permutation. into_iter ( ) . for_each ( |i| state. infer ( v_1_ty, i. clone ( ) ) ) ;
785+ for i in permutation. into_iter ( ) {
786+ state. infer ( v_1_ty, i. clone ( ) ) ;
787+ }
782788
783789 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
784790 let result = util:: get_inference ( v_1_ty, state. result ( ) ) ;
@@ -804,14 +810,16 @@ mod test {
804810 let inference_2 = TE :: DynamicArray {
805811 element : element_tv,
806812 } ;
807- let inferences = vec ! [ inference_1, inference_2] ;
813+ let inferences = [ inference_1, inference_2] ;
808814 let permutations: Vec < Vec < _ > > =
809815 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
810816
811817 // Check that they combine properly, and produce the same result no matter the
812818 // order
813819 for permutation in permutations {
814- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
820+ for i in permutation. into_iter ( ) {
821+ state. infer ( array_tv, i. clone ( ) ) ;
822+ }
815823
816824 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
817825 let result = util:: get_inference ( array_tv, state. result ( ) ) ;
@@ -842,14 +850,16 @@ mod test {
842850 let inference_2 = TE :: DynamicArray {
843851 element : element_tv,
844852 } ;
845- let inferences = vec ! [ inference_1, inference_2] ;
853+ let inferences = [ inference_1, inference_2] ;
846854 let permutations: Vec < Vec < _ > > =
847855 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
848856
849857 // Check that they combine properly, and produce the same result no matter the
850858 // order
851859 for permutation in permutations {
852- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
860+ for i in permutation. into_iter ( ) {
861+ state. infer ( array_tv, i. clone ( ) ) ;
862+ }
853863
854864 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
855865 let result = util:: get_inference ( array_tv, state. result ( ) ) ;
@@ -879,14 +889,16 @@ mod test {
879889 let elem_inference_2 = TE :: signed_word ( Some ( 64 ) ) ;
880890 state. infer ( elem_1_tv, elem_inference_1) ;
881891 state. infer ( elem_2_tv, elem_inference_2) ;
882- let inferences = vec ! [ array_inference_1, array_inference_2] ;
892+ let inferences = [ array_inference_1, array_inference_2] ;
883893 let permutations: Vec < Vec < _ > > =
884894 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
885895
886896 // Check that we get the same result, and that they combine properly
887897 for permutation in permutations {
888898 // Register the array inferences in the state
889- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
899+ for i in permutation. into_iter ( ) {
900+ state. infer ( array_tv, i. clone ( ) ) ;
901+ }
890902
891903 // Check the result is right
892904 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
@@ -921,14 +933,16 @@ mod test {
921933 let elem_inference_2 = TE :: signed_word ( Some ( 64 ) ) ;
922934 state. infer ( elem_1_tv, elem_inference_1) ;
923935 state. infer ( elem_2_tv, elem_inference_2) ;
924- let inferences = vec ! [ array_inference_1, array_inference_2] ;
936+ let inferences = [ array_inference_1, array_inference_2] ;
925937 let permutations: Vec < Vec < _ > > =
926938 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
927939
928940 // Check that we get the same result, and that they combine properly
929941 for permutation in permutations {
930942 // Register the array inferences in the state
931- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
943+ for i in permutation. into_iter ( ) {
944+ state. infer ( array_tv, i. clone ( ) ) ;
945+ }
932946
933947 // Check the array is right
934948 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
@@ -974,14 +988,16 @@ mod test {
974988 let elem_inference_2 = TE :: signed_word ( Some ( 64 ) ) ;
975989 state. infer ( elem_1_tv, elem_inference_1) ;
976990 state. infer ( elem_2_tv, elem_inference_2) ;
977- let inferences = vec ! [ array_inference_1, array_inference_2] ;
991+ let inferences = [ array_inference_1, array_inference_2] ;
978992 let permutations: Vec < Vec < _ > > =
979993 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
980994
981995 // Check that we get the same result, and that they combine properly
982996 for permutation in permutations {
983997 // Register the array inferences in the state
984- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
998+ for i in permutation. into_iter ( ) {
999+ state. infer ( array_tv, i. clone ( ) ) ;
1000+ }
9851001
9861002 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
9871003 let result = util:: get_inference ( array_tv, state. result ( ) ) ;
@@ -1023,14 +1039,16 @@ mod test {
10231039 let elem_inference_2 = TE :: signed_word ( Some ( 64 ) ) ;
10241040 state. infer ( elem_1_tv, elem_inference_1) ;
10251041 state. infer ( elem_2_tv, elem_inference_2) ;
1026- let inferences = vec ! [ array_inference_1, array_inference_2] ;
1042+ let inferences = [ array_inference_1, array_inference_2] ;
10271043 let permutations: Vec < Vec < _ > > =
10281044 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
10291045
10301046 // Check that we get the same result, and that they combine properly
10311047 for permutation in permutations {
10321048 // Register the array inferences in the state
1033- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
1049+ for i in permutation. into_iter ( ) {
1050+ state. infer ( array_tv, i. clone ( ) ) ;
1051+ }
10341052
10351053 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
10361054 let result = util:: get_inference ( array_tv, state. result ( ) ) ;
@@ -1074,14 +1092,16 @@ mod test {
10741092 let elem_inference_2 = TE :: signed_word ( Some ( 64 ) ) ;
10751093 state. infer ( elem_1_tv, elem_inference_1) ;
10761094 state. infer ( elem_2_tv, elem_inference_2) ;
1077- let inferences = vec ! [ array_inference_1, array_inference_2] ;
1095+ let inferences = [ array_inference_1, array_inference_2] ;
10781096 let permutations: Vec < Vec < _ > > =
10791097 inferences. iter ( ) . permutations ( inferences. len ( ) ) . unique ( ) . collect ( ) ;
10801098
10811099 // Check that we get the same result, and that they combine properly
10821100 for permutation in permutations {
10831101 // Register the array inferences in the state
1084- permutation. into_iter ( ) . for_each ( |i| state. infer ( array_tv, i. clone ( ) ) ) ;
1102+ for i in permutation. into_iter ( ) {
1103+ state. infer ( array_tv, i. clone ( ) ) ;
1104+ }
10851105
10861106 unify ( & mut state, & LazyWatchdog . in_rc ( ) ) ?;
10871107 let result = util:: get_inference ( array_tv, state. result ( ) ) ;
0 commit comments