summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 948d063fc..7a58314a9 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -408,8 +408,7 @@ impl WebWorker {
// If `None` is returned it means that runtime was destroyed before
// evaluation was complete. This can happen in Web Worker when `self.close()`
// is called at top level.
- let result = maybe_result.unwrap_or(Ok(()));
- return result;
+ maybe_result.unwrap_or(Ok(()))
}
event_loop_result = self.run_event_loop(false) => {
@@ -418,8 +417,7 @@ impl WebWorker {
}
event_loop_result?;
let maybe_result = receiver.next().await;
- let result = maybe_result.unwrap_or(Ok(()));
- return result;
+ maybe_result.unwrap_or(Ok(()))
}
}
}