@@ -14,7 +14,7 @@ use crate::support::resolver::{
1414
1515use proptest:: { prelude:: * , * } ;
1616
17- /// NOTE: proptest is a form of fuzz testing. It generates random input and makes shore that
17+ /// NOTE: proptest is a form of fuzz testing. It generates random input and makes sure that
1818/// certain universal truths are upheld. Therefore, it can pass when there is a problem,
1919/// but if it fails then there really is something wrong. When testing something as
2020/// complicated as the resolver, the problems can be very subtle and hard to generate.
@@ -41,7 +41,7 @@ proptest! {
4141 PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 )
4242 ) {
4343 let reg = registry( input. clone( ) ) ;
44- // there is only a small chance that eny one
44+ // there is only a small chance that any one
4545 // crate will be interesting.
4646 // So we try some of the most complicated.
4747 for this in input. iter( ) . rev( ) . take( 20 ) {
@@ -74,7 +74,7 @@ proptest! {
7474 . unwrap( ) ;
7575
7676 let reg = registry( input. clone( ) ) ;
77- // there is only a small chance that eny one
77+ // there is only a small chance that any one
7878 // crate will be interesting.
7979 // So we try some of the most complicated.
8080 for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -105,13 +105,13 @@ proptest! {
105105
106106 /// NOTE: if you think this test has failed spuriously see the note at the top of this macro.
107107 #[ test]
108- fn removing_a_dep_cant_brake (
108+ fn removing_a_dep_cant_break (
109109 PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 ) ,
110- indexs_to_remove in collection:: vec( ( any:: <prop:: sample:: Index >( ) , any:: <prop:: sample:: Index >( ) ) , ..10 )
110+ indexes_to_remove in collection:: vec( ( any:: <prop:: sample:: Index >( ) , any:: <prop:: sample:: Index >( ) ) , ..10 )
111111 ) {
112112 let reg = registry( input. clone( ) ) ;
113113 let mut removed_input = input. clone( ) ;
114- for ( summery_idx, dep_idx) in indexs_to_remove {
114+ for ( summery_idx, dep_idx) in indexes_to_remove {
115115 if removed_input. len( ) > 0 {
116116 let summery_idx = summery_idx. index( removed_input. len( ) ) ;
117117 let deps = removed_input[ summery_idx] . dependencies( ) ;
@@ -122,7 +122,7 @@ proptest! {
122122 }
123123 }
124124 let removed_reg = registry( removed_input) ;
125- // there is only a small chance that eny one
125+ // there is only a small chance that any one
126126 // crate will be interesting.
127127 // So we try some of the most complicated.
128128 for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -149,10 +149,10 @@ proptest! {
149149 #[ test]
150150 fn limited_independence_of_irrelevant_alternatives(
151151 PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 ) ,
152- indexs_to_unpublish in collection:: vec( any:: <prop:: sample:: Index >( ) , ..10 )
152+ indexes_to_unpublish in collection:: vec( any:: <prop:: sample:: Index >( ) , ..10 )
153153 ) {
154154 let reg = registry( input. clone( ) ) ;
155- // there is only a small chance that eny one
155+ // there is only a small chance that any one
156156 // crate will be interesting.
157157 // So we try some of the most complicated.
158158 for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -172,13 +172,13 @@ proptest! {
172172 . filter( |x| !r. contains( & x. package_id( ) ) )
173173 . collect( ) ;
174174 if !not_selected. is_empty( ) {
175- let indexs_to_unpublish : Vec <_> = indexs_to_unpublish . iter( ) . map( |x| x. get( & not_selected) ) . collect( ) ;
175+ let indexes_to_unpublish : Vec <_> = indexes_to_unpublish . iter( ) . map( |x| x. get( & not_selected) ) . collect( ) ;
176176
177177 let new_reg = registry(
178178 input
179179 . iter( )
180180 . cloned( )
181- . filter( |x| !indexs_to_unpublish . contains( & x) )
181+ . filter( |x| !indexes_to_unpublish . contains( & x) )
182182 . collect( ) ,
183183 ) ;
184184
@@ -196,7 +196,7 @@ proptest! {
196196 prop_assert!(
197197 res. is_ok( ) ,
198198 "unpublishing {:?} stopped `{} = \" ={}\" ` from working" ,
199- indexs_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
199+ indexes_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
200200 this. name( ) ,
201201 this. version( )
202202 )
@@ -206,13 +206,13 @@ proptest! {
206206 Err ( _) => {
207207 // If resolution was unsuccessful, then it should stay unsuccessful
208208 // even if any version of a crate is unpublished.
209- let indexs_to_unpublish : Vec <_> = indexs_to_unpublish . iter( ) . map( |x| x. get( & input) ) . collect( ) ;
209+ let indexes_to_unpublish : Vec <_> = indexes_to_unpublish . iter( ) . map( |x| x. get( & input) ) . collect( ) ;
210210
211211 let new_reg = registry(
212212 input
213213 . iter( )
214214 . cloned( )
215- . filter( |x| !indexs_to_unpublish . contains( & x) )
215+ . filter( |x| !indexes_to_unpublish . contains( & x) )
216216 . collect( ) ,
217217 ) ;
218218
@@ -227,7 +227,7 @@ proptest! {
227227 "full index did not work for `{} = \" ={}\" ` but unpublishing {:?} fixed it!" ,
228228 this. name( ) ,
229229 this. version( ) ,
230- indexs_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
230+ indexes_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
231231 )
232232 }
233233 }
0 commit comments