diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-11-04 16:38:52 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-11-04 10:38:52 -0500 |
commit | 0049d4e50c9dd945f25f69b08b08fbf492001f96 (patch) | |
tree | 3bcf3c50bdba9abba6b1b8ff9340f76fc19f759c /cli/ops/errors.rs | |
parent | 429439d1983269ba40141a1b42f6ac809d1e8c86 (diff) |
Refactor Worker and ThreadSafeState (#3242)
* Split ThreadSafeState into State and GlobalState. State is a "local"
state belonging to "Worker" while "GlobalState" is state shared by
whole program.
* Update "Worker" and ops to use "GlobalState" where applicable
* Move and refactor "WorkerChannels" resource
Diffstat (limited to 'cli/ops/errors.rs')
-rw-r--r-- | cli/ops/errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs index 2d786b97d..3d94c05c4 100644 --- a/cli/ops/errors.rs +++ b/cli/ops/errors.rs @@ -30,7 +30,7 @@ fn op_format_error( _zero_copy: Option<PinnedBuf>, ) -> Result<JsonOp, ErrBox> { let args: FormatErrorArgs = serde_json::from_value(args)?; - let error = JSError::from_json(&args.error, &state.ts_compiler); + let error = JSError::from_json(&args.error, &state.global_state.ts_compiler); Ok(JsonOp::Sync(json!({ "error": error.to_string(), @@ -57,7 +57,7 @@ fn op_apply_source_map( args.line.into(), args.column.into(), &mut mappings_map, - &state.ts_compiler, + &state.global_state.ts_compiler, ); Ok(JsonOp::Sync(json!({ |