aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source/file_reading.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/task_source/file_reading.rs')
-rw-r--r--components/script/task_source/file_reading.rs18
1 files changed, 3 insertions, 15 deletions
diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs
index 433cc78c260..dc9a6a751dd 100644
--- a/components/script/task_source/file_reading.rs
+++ b/components/script/task_source/file_reading.rs
@@ -34,21 +34,9 @@ impl TaskSource for FileReadingTaskSource {
}
}
-pub struct FileReadingRunnable {
- task: FileReadingTask,
-}
-
-impl FileReadingRunnable {
- pub fn new(task: FileReadingTask) -> Box<FileReadingRunnable> {
- box FileReadingRunnable {
- task: task
- }
- }
-}
-
-impl Task for FileReadingRunnable {
- fn run(self: Box<FileReadingRunnable>) {
- self.task.handle_task();
+impl Task for FileReadingTask {
+ fn run(self: Box<Self>) {
+ self.handle_task();
}
}