Skip to content

Commit

Permalink
chore: update rustyline dependency to v12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Jul 20, 2023
1 parent 4772e2f commit a4a1a32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion miden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hex = { version = "0.4", optional = true }
log = { version = "0.4", default-features = false }
processor = { package = "miden-processor", path = "../processor", version = "0.7", default-features = false }
prover = { package = "miden-prover", path = "../prover", version = "0.7", default-features = false }
rustyline = { version = "10.0.0", default-features = false, optional = true}
rustyline = { version = "12.0", default-features = false, optional = true }
serde = {version = "1.0.117", optional = true }
serde_derive = {version = "1.0.117", optional = true }
serde_json = {version = "1.0.59", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions miden/src/cli/debug/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::data::{Debug, InputFile, Libraries, ProgramFile};
use rustyline::{error::ReadlineError, Config, EditMode, Editor};
use rustyline::{error::ReadlineError, Config, DefaultEditor, EditMode};
use std::path::PathBuf;
use structopt::StructOpt;

Expand Down Expand Up @@ -60,7 +60,7 @@ impl DebugCmd {

// initialize readline
let mut rl =
Editor::<()>::with_config(rl_config).expect("Readline couldn't be initialized");
DefaultEditor::with_config(rl_config).expect("Readline couldn't be initialized");

println!("Welcome! Enter `h` for help.");

Expand Down
6 changes: 3 additions & 3 deletions miden/src/repl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use miden::{
math::{Felt, StarkField},
MemAdviceProvider, StackInputs, Word,
};
use rustyline::{error::ReadlineError, Editor};
use rustyline::{error::ReadlineError, DefaultEditor};

/// This work is in continuation to the amazing work done by team `Scribe`
/// [here](https://github.com/ControlCplusControlV/Scribe/blob/main/transpiler/src/repl.rs#L8)
Expand Down Expand Up @@ -140,7 +140,7 @@ pub fn start_repl() {
let mut memory: Vec<(u64, Word)> = Vec::new();

// initializing readline.
let mut rl = Editor::<()>::new().expect("Readline couldn't be initialized");
let mut rl = DefaultEditor::new().expect("Readline couldn't be initialized");
loop {
let program = format!(
"begin\n{}\nend",
Expand Down Expand Up @@ -232,7 +232,7 @@ pub fn start_repl() {
} else if line == "!stack" {
should_print_stack = true;
} else {
rl.add_history_entry(line.clone());
rl.add_history_entry(line.clone()).expect("Failed to add a history entry");
program_lines.push(line.clone());
should_print_stack = true;
}
Expand Down

0 comments on commit a4a1a32

Please sign in to comment.