Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper authored Nov 4, 2022
1 parent 468d12b commit 3e05980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/drain_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rayon::prelude::*;
fn drain_vec_yielded() {
let mut vec_org = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

let yielded = vec_org.par_drain(0..5).into_par_iter().collect::<Vec<_>>();
let yielded = vec_org.par_drain(0..5).collect::<Vec<_>>();

assert_eq!(&yielded, &[0, 1, 2, 3, 4]);
assert_eq!(&vec_org, &[5, 6, 7, 8, 9]);
Expand All @@ -24,7 +24,7 @@ fn drain_vec_dropped() {
fn drain_vec_empty_range_yielded() {
let mut vec_org = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

let yielded = vec_org.par_drain(5..5).into_par_iter().collect::<Vec<_>>();
let yielded = vec_org.par_drain(5..5).collect::<Vec<_>>();

assert_eq!(&yielded, &[]);
assert_eq!(&vec_org, &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
Expand Down

0 comments on commit 3e05980

Please sign in to comment.