diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-02-26 05:52:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 11:52:15 +0100 |
commit | 9a8d6fbd984d2c0f9775d90af64b3e95231dd21d (patch) | |
tree | 12112b2114a8c739ae741357fde873f522bf7180 /cli/global_state.rs | |
parent | 3eebef39c55ead92d17bdf8016c3c58118b49936 (diff) |
DenoFlags -> Flags (#4136)
Diffstat (limited to 'cli/global_state.rs')
-rw-r--r-- | cli/global_state.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/global_state.rs b/cli/global_state.rs index 7387f674c..45a31406c 100644 --- a/cli/global_state.rs +++ b/cli/global_state.rs @@ -31,7 +31,7 @@ pub struct GlobalState(Arc<GlobalStateInner>); /// It is shared by all created workers (thus V8 isolates). pub struct GlobalStateInner { /// Flags parsed from `argv` contents. - pub flags: flags::DenoFlags, + pub flags: flags::Flags, /// Permissions parsed from `flags`. pub permissions: DenoPermissions, pub dir: deno_dir::DenoDir, @@ -53,7 +53,7 @@ impl Deref for GlobalState { } impl GlobalState { - pub fn new(flags: flags::DenoFlags) -> Result<Self, ErrBox> { + pub fn new(flags: flags::Flags) -> Result<Self, ErrBox> { let custom_root = env::var("DENO_DIR").map(String::into).ok(); let dir = deno_dir::DenoDir::new(custom_root)?; let deps_cache_location = dir.root.join("deps"); @@ -168,9 +168,9 @@ impl GlobalState { #[cfg(test)] pub fn mock(argv: Vec<String>) -> GlobalState { - GlobalState::new(flags::DenoFlags { + GlobalState::new(flags::Flags { argv, - ..flags::DenoFlags::default() + ..flags::Flags::default() }) .unwrap() } @@ -184,8 +184,8 @@ fn thread_safe() { #[test] fn import_map_given_for_repl() { - let _result = GlobalState::new(flags::DenoFlags { + let _result = GlobalState::new(flags::Flags { import_map_path: Some("import_map.json".to_string()), - ..flags::DenoFlags::default() + ..flags::Flags::default() }); } |