@@ -258,12 +258,12 @@ where
258258        let  mut  it = get_it ( ) ; 
259259
260260        for  _ in  0 ..( counts. len ( )  - 1 )  { 
261-             if  let   None  =  it. next ( )  { 
261+             if  it. next ( ) . is_none ( )  { 
262262                panic ! ( "Iterator shouldn't be finished, may not be deterministic" ) ; 
263263            } 
264264        } 
265265
266-         if  let   None  =  it. next ( )  { 
266+         if  it. next ( ) . is_none ( )  { 
267267            break  ' outer; 
268268        } 
269269
@@ -721,7 +721,7 @@ quickcheck! {
721721
722722        assert_eq!( expected_first,  curr_perm) ; 
723723
724-         while   let   Some ( next_perm)  =  perms. next ( )  { 
724+         for   next_perm in  perms { 
725725            assert!( 
726726                next_perm > curr_perm, 
727727                "next perm isn't greater-than current; next_perm={:?} curr_perm={:?} n={}" , 
@@ -943,8 +943,7 @@ quickcheck! {
943943    fn  fuzz_group_by_lazy_1( it:  Iter <u8 >)  -> bool  { 
944944        let  jt = it. clone( ) ; 
945945        let  groups = it. group_by( |k| * k) ; 
946-         let  res = itertools:: equal( jt,  groups. into_iter( ) . flat_map( |( _,  x) | x) ) ; 
947-         res
946+         itertools:: equal( jt,  groups. into_iter( ) . flat_map( |( _,  x) | x) ) 
948947    } 
949948} 
950949
@@ -1286,7 +1285,7 @@ quickcheck! {
12861285            . map( |i| ( i % modulo,  i) ) 
12871286            . into_group_map( ) 
12881287            . into_iter( ) 
1289-             . map( |( key,  vals) | ( key,  vals. into_iter( ) . fold ( 0u64 ,  |acc ,  val| acc + val ) ) ) 
1288+             . map( |( key,  vals) | ( key,  vals. into_iter( ) . sum ( ) ) ) 
12901289            . collect:: <HashMap <_, _>>( ) ; 
12911290        assert_eq!( lookup,  group_map_lookup) ; 
12921291
@@ -1551,7 +1550,6 @@ quickcheck! {
15511550} 
15521551
15531552quickcheck !  { 
1554-     #[ test] 
15551553    fn  counts( nums:  Vec <isize >)  -> TestResult  { 
15561554        let  counts = nums. iter( ) . counts( ) ; 
15571555        for  ( & item,  & count)  in counts. iter( )  { 
@@ -1602,7 +1600,7 @@ quickcheck! {
16021600
16031601fn  is_fused < I :  Iterator > ( mut  it :  I )  -> bool 
16041602{ 
1605-     while   let   Some ( _ )  =  it. next ( )  { } 
1603+     for  _  in  it. by_ref ( )  { } 
16061604    for  _ in  0 ..10 { 
16071605        if  it. next ( ) . is_some ( ) { 
16081606            return  false ; 
0 commit comments