From bef0df6d91a4bc7ad1b20e068d374d20a6d78b42 Mon Sep 17 00:00:00 2001 From: Compey Date: Mon, 14 Aug 2023 20:20:23 +0530 Subject: [PATCH] fix: remove orphan testing code --- src/cli/repl.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/cli/repl.rs b/src/cli/repl.rs index 5ade3ae..159cfdf 100644 --- a/src/cli/repl.rs +++ b/src/cli/repl.rs @@ -1,5 +1,4 @@ use std::{ - fmt::Write, io::ErrorKind, path::PathBuf, process::{exit, ExitCode}, @@ -9,15 +8,10 @@ use anyhow::Result; use clap::Command; use directories::UserDirs; use lune::lua::stdio::formatting::pretty_format_luau_error; -use lune::{Lune, LuneError}; +use lune::Lune; use mlua::ExternalError; use rustyline::{error::ReadlineError, history::FileHistory, DefaultEditor, Editor}; -enum PromptState { - Regular, - Continuation, -} - // Isn't dependency injection plain awesome?! pub async fn show_interface(cmd: Command) -> Result { let lune_version = cmd.get_version(); @@ -63,18 +57,12 @@ pub async fn show_interface(cmd: Command) -> Result { } }; - let mut prompt_kind: PromptState = PromptState::Regular; let mut interrupt_counter = 0u32; loop { let mut source_code = String::new(); - let prompt = match prompt_kind { - PromptState::Regular => "> ", - PromptState::Continuation => ">> ", - }; - - match repl.readline(prompt) { + match repl.readline("> ") { Ok(code) => { source_code = code.clone();