summaryrefslogtreecommitdiff
path: root/cli/tools/repl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/repl/mod.rs')
-rw-r--r--cli/tools/repl/mod.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs
index e40c6362a..98519b60d 100644
--- a/cli/tools/repl/mod.rs
+++ b/cli/tools/repl/mod.rs
@@ -16,7 +16,6 @@ use deno_core::unsync::spawn_blocking;
use deno_runtime::permissions::Permissions;
use deno_runtime::permissions::PermissionsContainer;
use rustyline::error::ReadlineError;
-use tokio::sync::mpsc::unbounded_channel;
mod channel;
mod editor;
@@ -32,8 +31,7 @@ pub use session::EvaluationOutput;
pub use session::ReplSession;
pub use session::REPL_INTERNALS_NAME;
-use super::test::TestEvent;
-use super::test::TestEventSender;
+use super::test::create_single_test_event_channel;
struct Repl {
session: ReplSession,
@@ -168,9 +166,8 @@ pub async fn run(flags: Flags, repl_flags: ReplFlags) -> Result<i32, AnyError> {
.deno_dir()
.ok()
.and_then(|dir| dir.repl_history_file_path());
- let (test_event_sender, test_event_receiver) =
- unbounded_channel::<TestEvent>();
- let test_event_sender = TestEventSender::new(test_event_sender);
+ let (worker, test_event_receiver) = create_single_test_event_channel();
+ let test_event_sender = worker.sender;
let mut worker = worker_factory
.create_custom_worker(
main_module.clone(),