Skip to content

Commit 411ef7a

Browse files
committed
Apply some clippy lints: sort_unstable when T is usize
1 parent 5e3146a commit 411ef7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/from_parallel_stream.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async fn is_send() {
1818
let v: Vec<usize> = vec![1, 2, 3, 4];
1919
let stream = v.into_par_stream().map(|n| async move { n * n });
2020
let mut res = Vec::from_par_stream(stream).await;
21-
res.sort();
21+
res.sort_unstable();
2222
assert_eq!(res, vec![1, 4, 9, 16]);
2323
})
2424
.await;

src/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async fn smoke() {
9494
while let Some(n) = stream.next().await {
9595
out.push(n);
9696
}
97-
out.sort();
97+
out.sort_unstable();
9898

9999
assert_eq!(out, vec![1usize, 4, 9, 16]);
100100
}

0 commit comments

Comments
 (0)