Skip to content

Commit a0a3b86

Browse files
committed
clippy
1 parent 29bb315 commit a0a3b86

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

turbopack/crates/turbo-tasks-backend/src/backend/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
16391639
let mut task = ctx.task(task_id, TaskDataCategory::All);
16401640
if let Some(tasks) = task.prefetch() {
16411641
drop(task);
1642-
ctx.prepare_tasks(tasks.into_iter());
1642+
ctx.prepare_tasks(tasks);
16431643
task = ctx.task(task_id, TaskDataCategory::All);
16441644
}
16451645
let in_progress = remove!(task, InProgress)?;

turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,11 @@ where
215215
}
216216

217217
fn get_tx(&self) -> Option<&<B as BackingStorageSealed>::ReadTransaction<'tx>> {
218-
let tx = match &self.transaction {
218+
match &self.transaction {
219219
TransactionState::None => unreachable!(),
220220
TransactionState::Borrowed(tx) => *tx,
221221
TransactionState::Owned(tx) => tx.as_ref(),
222-
};
223-
tx
222+
}
224223
}
225224

226225
fn prepare_tasks_with_callback(
@@ -307,7 +306,7 @@ where
307306
self.restore_task_data_batch(&tasks_to_restore_for_data, TaskDataCategory::Data)
308307
{
309308
data.into_iter()
310-
.zip(tasks_to_restore_for_data_indicies.into_iter())
309+
.zip(tasks_to_restore_for_data_indicies)
311310
.for_each(|(items, idx)| {
312311
tasks[idx].2 = Some(items);
313312
});
@@ -322,7 +321,7 @@ where
322321
self.restore_task_data_batch(&tasks_to_restore_for_meta, TaskDataCategory::Meta)
323322
{
324323
data.into_iter()
325-
.zip(tasks_to_restore_for_meta_indicies.into_iter())
324+
.zip(tasks_to_restore_for_meta_indicies)
326325
.for_each(|(items, idx)| {
327326
tasks[idx].3 = Some(items);
328327
});

turbopack/crates/turbo-tasks-backend/src/kv_backing_storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ impl<T: KeyValueDatabase + Send + Sync + 'static> BackingStorageSealed
561561
},
562562
&keys,
563563
)?;
564-
Ok(bytes
564+
bytes
565565
.into_iter()
566566
.map(|opt_bytes| {
567567
if let Some(bytes) = opt_bytes {
@@ -571,7 +571,7 @@ impl<T: KeyValueDatabase + Send + Sync + 'static> BackingStorageSealed
571571
Ok(Vec::new())
572572
}
573573
})
574-
.collect::<Result<Vec<_>>>()?)
574+
.collect::<Result<Vec<_>>>()
575575
}
576576
inner
577577
.with_tx(tx, |tx| lookup(&inner.database, tx, task_ids, category))

0 commit comments

Comments
 (0)