diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-01-15 12:06:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 09:36:46 +0530 |
commit | fd85f840cd707c31d08fa836562127e249c9ff62 (patch) | |
tree | c4847881976069d41d1b53616bdeaf5d073f3af6 /cli/worker.rs | |
parent | 05ef925eb095ae603f694fe8172ddcbd5b19b9b2 (diff) |
refactor: clean up `unwrap` and `clone` (#17282)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index 7e0616650..e34c65d66 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -184,14 +184,10 @@ impl CliMainWorker { // Enable op call tracing in core to enable better debugging of op sanitizer // failures. if self.ps.options.trace_ops() { - self - .worker - .js_runtime - .execute_script( - &located_script_name!(), - "Deno.core.enableOpCallTracing();", - ) - .unwrap(); + self.worker.js_runtime.execute_script( + &located_script_name!(), + "Deno.core.enableOpCallTracing();", + )?; } let mut maybe_coverage_collector = @@ -233,13 +229,10 @@ impl CliMainWorker { ) -> Result<(), AnyError> { self.enable_test(); - self - .worker - .execute_script( - &located_script_name!(), - "Deno.core.enableOpCallTracing();", - ) - .unwrap(); + self.worker.execute_script( + &located_script_name!(), + "Deno.core.enableOpCallTracing();", + )?; if mode != TestMode::Documentation { // We execute the module module as a side module so that import.meta.main is not set. |