Update rustyline dependency
This commit is contained in:
parent
1be927bc5d
commit
da6d5a93c9
|
@ -63,7 +63,7 @@ luajit-src = { version = ">= 210.4.0, < 220.0.0", optional = true }
|
||||||
luau0-src = { version = "0.5.0", optional = true }
|
luau0-src = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rustyline = "10.0"
|
rustyline = "11.0"
|
||||||
criterion = { version = "0.4", features = ["html_reports", "async_tokio"] }
|
criterion = { version = "0.4", features = ["html_reports", "async_tokio"] }
|
||||||
trybuild = "1.0"
|
trybuild = "1.0"
|
||||||
futures = "0.3.5"
|
futures = "0.3.5"
|
||||||
|
|
|
@ -5,7 +5,7 @@ use rustyline::Editor;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let lua = Lua::new();
|
let lua = Lua::new();
|
||||||
let mut editor = Editor::<()>::new().expect("Failed to make rustyline editor");
|
let mut editor = Editor::<(), _>::new().expect("Failed to make rustyline editor");
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let mut prompt = "> ";
|
let mut prompt = "> ";
|
||||||
|
@ -19,7 +19,7 @@ fn main() {
|
||||||
|
|
||||||
match lua.load(&line).eval::<MultiValue>() {
|
match lua.load(&line).eval::<MultiValue>() {
|
||||||
Ok(values) => {
|
Ok(values) => {
|
||||||
editor.add_history_entry(line);
|
editor.add_history_entry(line).unwrap();
|
||||||
println!(
|
println!(
|
||||||
"{}",
|
"{}",
|
||||||
values
|
values
|
||||||
|
|
Loading…
Reference in New Issue