mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce TaskOnce
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
This commit is contained in:
parent
52527d6f9d
commit
6c9fb5ae7a
26 changed files with 144 additions and 124 deletions
|
@ -416,11 +416,11 @@ fn perform_annotated_read_operation(
|
|||
) {
|
||||
// Step 4
|
||||
let task = FileReadingTask::ProcessRead(filereader.clone(), gen_id);
|
||||
task_source.queue_with_canceller(box task, &canceller).unwrap();
|
||||
task_source.queue_with_canceller(task, &canceller).unwrap();
|
||||
|
||||
let task = FileReadingTask::ProcessReadData(filereader.clone(), gen_id);
|
||||
task_source.queue_with_canceller(box task, &canceller).unwrap();
|
||||
task_source.queue_with_canceller(task, &canceller).unwrap();
|
||||
|
||||
let task = FileReadingTask::ProcessReadEOF(filereader, gen_id, data, blob_contents);
|
||||
task_source.queue_with_canceller(box task, &canceller).unwrap();
|
||||
task_source.queue_with_canceller(task, &canceller).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue