Skip to content

Commit

Permalink
Fix wrong history file name
Browse files Browse the repository at this point in the history
  • Loading branch information
YushiOMOTE committed Dec 11, 2019
1 parent 764bbd5 commit 9d706d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/examples/pc/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ use structopt::StructOpt;

use lazy_static::lazy_static;

const HISTORY_FILE: &'static str = ".gy.txt";

#[derive(Debug)]
struct CmdError(String);

Expand Down Expand Up @@ -113,7 +115,7 @@ impl Debugger {

let mut rl = Editor::<()>::new();

if rl.load_history(".gy.txt").is_err() {
if rl.load_history(HISTORY_FILE).is_err() {
println!("No previous history");
}

Expand Down Expand Up @@ -153,7 +155,7 @@ impl Debugger {
}
};

let _ = rl.save_history("history.txt");
let _ = rl.save_history(HISTORY_FILE);

if abort {
std::process::exit(1);
Expand Down

0 comments on commit 9d706d2

Please sign in to comment.