remove repeated code

This commit is contained in:
Ihor Andrianov
2025-02-12 02:34:13 +02:00
parent a5fcbed21a
commit 287c04bde0
2 changed files with 4 additions and 19 deletions

View File

@@ -4,7 +4,7 @@ mod import;
mod opcodes_dictionary;
use rustyline::{error::ReadlineError, DefaultEditor};
use std::sync::atomic::Ordering;
use std::{io::IsTerminal, sync::atomic::Ordering};
fn main() -> anyhow::Result<()> {
env_logger::init();
@@ -15,6 +15,7 @@ fn main() -> anyhow::Result<()> {
if history_file.exists() {
rl.load_history(history_file.as_path())?;
}
let is_terminal = std::io::stdin().is_terminal();
loop {
let readline = rl.readline(&app.prompt);
match readline {