diff options
author | Ry Dahl <ry@tinyclouds.org> | 2019-12-03 17:23:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-03 17:23:10 -0500 |
commit | ee013102ff4ce75c1068b6e771ed120fc32a849d (patch) | |
tree | 8400d15796c879a80fc4640606e5bcf9558ad09a /cli/lib.rs | |
parent | 00844b41428a73d3fb3fd06ba3e564b4e1e3c63c (diff) |
remove duplicated argv member from ThreadSafeGlobalState (#3433)
Diffstat (limited to 'cli/lib.rs')
-rw-r--r-- | cli/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/lib.rs b/cli/lib.rs index c0bf57b5b..df4cbbdf0 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -110,9 +110,7 @@ fn create_worker_and_state( } }); - // TODO(ry) Remove argv param from ThreadSafeGlobalState::new. - let argv = flags.argv.clone(); - let global_state = ThreadSafeGlobalState::new(flags, argv, progress) + let global_state = ThreadSafeGlobalState::new(flags, progress) .map_err(deno_error::print_err_and_exit) .unwrap(); @@ -297,8 +295,8 @@ fn fetch_command(flags: DenoFlags) { } fn eval_command(flags: DenoFlags) { - let (mut worker, state) = create_worker_and_state(flags); - let ts_source = state.argv[1].clone(); + let ts_source = flags.argv[1].clone(); + let (mut worker, _state) = create_worker_and_state(flags); // Force TypeScript compile. let main_module = ModuleSpecifier::resolve_url_or_path("./__$deno$eval.ts").unwrap(); |