diff options
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/cli/main.rs b/cli/main.rs index 6bae9c2d7..8672a5681 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -63,7 +63,6 @@ use crate::file_fetcher::SourceFileFetcher; use crate::file_fetcher::TextDocument; use crate::fs as deno_fs; use crate::global_state::GlobalState; -use crate::inspector::InspectorSession; use crate::media_type::MediaType; use crate::permissions::Permissions; use crate::worker::MainWorker; @@ -432,26 +431,7 @@ async fn run_repl(flags: Flags) -> Result<(), AnyError> { let mut worker = MainWorker::new(&global_state, main_module.clone()); (&mut *worker).await?; - let inspector = worker - .inspector - .as_mut() - .expect("Inspector is not created."); - - let inspector_session = InspectorSession::new(&mut **inspector); - let repl = repl::run(&global_state, inspector_session); - - tokio::pin!(repl); - - loop { - tokio::select! { - result = &mut repl => { - return result; - } - _ = &mut *worker => { - tokio::time::delay_for(tokio::time::Duration::from_millis(10)).await; - } - } - } + repl::run(&global_state, worker).await } async fn run_from_stdin(flags: Flags) -> Result<(), AnyError> { |