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/proc_state.rs | |
parent | 05ef925eb095ae603f694fe8172ddcbd5b19b9b2 (diff) |
refactor: clean up `unwrap` and `clone` (#17282)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index ac06e6c72..b3c3b90cd 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -133,7 +133,7 @@ impl ProcState { // Add the extra files listed in the watch flag if let Some(watch_paths) = ps.options.watch_paths() { - files_to_watch_sender.send(watch_paths.clone()).unwrap(); + files_to_watch_sender.send(watch_paths.clone())?; } if let Ok(Some(import_map_path)) = ps @@ -141,7 +141,7 @@ impl ProcState { .resolve_import_map_specifier() .map(|ms| ms.and_then(|ref s| s.to_file_path().ok())) { - files_to_watch_sender.send(vec![import_map_path]).unwrap(); + files_to_watch_sender.send(vec![import_map_path])?; } Ok(ps) @@ -625,9 +625,9 @@ impl ProcState { // but sadly that's not the case due to missing APIs in V8. let is_repl = matches!(self.options.sub_command(), DenoSubcommand::Repl(_)); let referrer = if referrer.is_empty() && is_repl { - deno_core::resolve_url_or_path("./$deno$repl.ts").unwrap() + deno_core::resolve_url_or_path("./$deno$repl.ts")? } else { - deno_core::resolve_url_or_path(referrer).unwrap() + deno_core::resolve_url_or_path(referrer)? }; // FIXME(bartlomieju): this is another hack way to provide NPM specifier |