We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cbadf9 commit 74071a9Copy full SHA for 74071a9
1 file changed
src/main.rs
@@ -38,9 +38,7 @@ async fn main() -> Result<()> {
38
39
let mut rl = Editor::<()>::new()?;
40
41
- if rl.load_history("repl.history").is_err() {
42
- println!("No previous history.");
43
- }
+ rl.load_history("repl.history").ok();
44
45
let client = engine::Rustbase::connect(args.host, args.port).await;
46
@@ -61,10 +59,13 @@ async fn main() -> Result<()> {
61
59
}
62
60
Err(ReadlineError::Interrupted) => {
63
println!("bye");
+ rl.save_history("repl.history").ok();
+
64
break;
65
66
Err(ReadlineError::Eof) => {
67
68
69
70
71
Err(err) => {
0 commit comments