File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -450,7 +450,13 @@ quickcheck! {
450450 }
451451 assert_eq!( answer, actual) ;
452452
453- assert_eq!( answer. into_iter( ) . last( ) , a. multi_cartesian_product( ) . last( ) ) ;
453+ assert_eq!(
454+ {
455+ #[ allow( clippy:: double_ended_iterator_last) ]
456+ answer. into_iter( ) . last( )
457+ } ,
458+ a. multi_cartesian_product( ) . last( )
459+ ) ;
454460 }
455461
456462 fn correct_empty_multi_product( ) -> ( ) {
Original file line number Diff line number Diff line change @@ -503,7 +503,10 @@ quickcheck! {
503503 }
504504
505505 check_results_specialized!( it, |i| i. count( ) ) ;
506- check_results_specialized!( it, |i| i. last( ) ) ;
506+ check_results_specialized!( it, |i| {
507+ #[ allow( clippy:: double_ended_iterator_last) ]
508+ i. last( )
509+ } ) ;
507510 check_results_specialized!( it, |i| i. collect:: <Vec <_>>( ) ) ;
508511 check_results_specialized!( it, |i| i. rev( ) . collect:: <Vec <_>>( ) ) ;
509512 check_results_specialized!( it, |i| {
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ fn count_clones() {
281281 let f = Foo { n : Cell :: new ( 0 ) } ;
282282 let it = it:: repeat_n ( f, n) ;
283283 // drain it
284+ #[ allow( clippy:: double_ended_iterator_last) ]
284285 let last = it. last ( ) ;
285286 if n == 0 {
286287 assert_eq ! ( last, None ) ;
You can’t perform that action at this time.
0 commit comments