summaryrefslogtreecommitdiff
path: root/cli/state.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-06 23:05:02 -0500
committerGitHub <noreply@github.com>2020-02-06 23:05:02 -0500
commitd9c84eb91eecdf1225091e4d2bea8e4c6a076504 (patch)
treef9d65e93a5ae4ce2cfd4ebf0c6b7fe7fe1da822f /cli/state.rs
parent522e856347b27b939dac92eb592ce64d86a96c03 (diff)
Rename ThreadSafeGlobalState to GlobalState (#3907)
simplify
Diffstat (limited to 'cli/state.rs')
-rw-r--r--cli/state.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/state.rs b/cli/state.rs
index f09191f11..86479d707 100644
--- a/cli/state.rs
+++ b/cli/state.rs
@@ -1,7 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::compilers::TargetLib;
use crate::deno_error::permission_denied;
-use crate::global_state::ThreadSafeGlobalState;
+use crate::global_state::GlobalState;
use crate::global_timer::GlobalTimer;
use crate::import_map::ImportMap;
use crate::metrics::Metrics;
@@ -45,7 +45,7 @@ pub struct ThreadSafeState(Arc<State>);
#[cfg_attr(feature = "cargo-clippy", allow(stutter))]
pub struct State {
- pub global_state: ThreadSafeGlobalState,
+ pub global_state: GlobalState,
pub permissions: Arc<Mutex<DenoPermissions>>,
pub main_module: ModuleSpecifier,
/// When flags contains a `.import_map_path` option, the content of the
@@ -223,7 +223,7 @@ impl Loader for ThreadSafeState {
impl ThreadSafeState {
/// If `shared_permission` is None then permissions from globa state are used.
pub fn new(
- global_state: ThreadSafeGlobalState,
+ global_state: GlobalState,
shared_permissions: Option<Arc<Mutex<DenoPermissions>>>,
main_module: ModuleSpecifier,
) -> Result<Self, ErrBox> {
@@ -267,7 +267,7 @@ impl ThreadSafeState {
/// If `shared_permission` is None then permissions from globa state are used.
pub fn new_for_worker(
- global_state: ThreadSafeGlobalState,
+ global_state: GlobalState,
shared_permissions: Option<Arc<Mutex<DenoPermissions>>>,
main_module: ModuleSpecifier,
) -> Result<Self, ErrBox> {
@@ -375,7 +375,7 @@ impl ThreadSafeState {
let module_specifier = ModuleSpecifier::resolve_url_or_path(main_module)
.expect("Invalid entry module");
ThreadSafeState::new(
- ThreadSafeGlobalState::mock(vec!["deno".to_string()]),
+ GlobalState::mock(vec!["deno".to_string()]),
None,
module_specifier,
)