diff options
Diffstat (limited to 'cli/compilers/ts.rs')
-rw-r--r-- | cli/compilers/ts.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index f3147334f..3adf92495 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -1,4 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +use super::compiler_worker::CompilerWorker; use crate::compilers::CompilationResultFuture; use crate::compilers::CompiledModule; use crate::compilers::CompiledModuleFuture; @@ -13,7 +14,6 @@ use crate::source_maps::SourceMapGetter; use crate::startup_data; use crate::state::*; use crate::version; -use crate::worker::Worker; use deno_core::Buf; use deno_core::ErrBox; use deno_core::ModuleSpecifier; @@ -228,7 +228,7 @@ impl TsCompiler { } /// Create a new V8 worker with snapshot of TS compiler and setup compiler's runtime. - fn setup_worker(global_state: ThreadSafeGlobalState) -> Worker { + fn setup_worker(global_state: ThreadSafeGlobalState) -> CompilerWorker { let (int, ext) = ThreadSafeState::create_channels(); let worker_state = ThreadSafeState::new(global_state.clone(), None, None, int) @@ -240,7 +240,7 @@ impl TsCompiler { .compiler_starts .fetch_add(1, Ordering::SeqCst); - let mut worker = Worker::new( + let mut worker = CompilerWorker::new( "TS".to_string(), startup_data::compiler_isolate_init(), worker_state, @@ -279,7 +279,7 @@ impl TsCompiler { worker.post_message(req_msg).await?; worker.await?; debug!("Sent message to worker"); - let maybe_msg = worker_.get_message().await?; + let maybe_msg = worker_.get_message().await; debug!("Received message from worker"); if let Some(msg) = maybe_msg { let json_str = std::str::from_utf8(&msg).unwrap(); @@ -378,7 +378,7 @@ impl TsCompiler { worker.post_message(req_msg).await?; worker.await?; debug!("Sent message to worker"); - let maybe_msg = worker_.get_message().await?; + let maybe_msg = worker_.get_message().await; if let Some(msg) = maybe_msg { let json_str = std::str::from_utf8(&msg).unwrap(); debug!("Message: {}", json_str); @@ -633,7 +633,7 @@ pub fn runtime_compile_async<S: BuildHasher>( worker.post_message(req_msg).await?; worker.await?; debug!("Sent message to worker"); - let msg = (worker_.get_message().await?).unwrap(); + let msg = (worker_.get_message().await).unwrap(); let json_str = std::str::from_utf8(&msg).unwrap(); Ok(json!(json_str)) } @@ -661,7 +661,7 @@ pub fn runtime_transpile_async<S: BuildHasher>( worker.post_message(req_msg).await?; worker.await?; debug!("Sent message to worker"); - let msg = (worker_.get_message().await?).unwrap(); + let msg = (worker_.get_message().await).unwrap(); let json_str = std::str::from_utf8(&msg).unwrap(); Ok(json!(json_str)) } |