Skip to content

Commit 5196835

Browse files
committed
fix: Clippy suggestions
1 parent 3663a3c commit 5196835

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/walk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ impl WorkerState {
416416
if let Some(sort_key) = config.sort_key {
417417
sort_worker_results(&mut results, sort_key);
418418
}
419-
exec::batch(results.into_iter(), cmd, config)
419+
exec::batch(results, cmd, config)
420420
} else if let Some(sort_key) = config.sort_key {
421421
// With --sort, we must collect all results before dispatching,
422422
// and run sequentially so the order is preserved.
423423

424424
let mut results: Vec<WorkerResult> = rx.into_iter().flatten().collect();
425425
sort_worker_results(&mut results, sort_key);
426-
return exec::job(results.into_iter(), cmd, config);
426+
exec::job(results, cmd, config)
427427
} else {
428428
thread::scope(|scope| {
429429
// Each spawned job will store its thread handle in here.
@@ -675,7 +675,7 @@ impl WorkerState {
675675
}
676676
}
677677

678-
fn sort_worker_results(results: &mut Vec<WorkerResult>, sort_key: SortKey) {
678+
fn sort_worker_results(results: &mut [WorkerResult], sort_key: SortKey) {
679679
results.sort_by(|a, b| {
680680
// Errors sort to the end; two errors are considered equal
681681
let (WorkerResult::Entry(a), WorkerResult::Entry(b)) = (a, b) else {

0 commit comments

Comments
 (0)