From 9d706d2a30047474ad4a85387eb312cc3b8e7c7d Mon Sep 17 00:00:00 2001 From: Yushi OMOTE Date: Wed, 11 Dec 2019 23:19:43 +0900 Subject: [PATCH] Fix wrong history file name --- core/examples/pc/debug.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/examples/pc/debug.rs b/core/examples/pc/debug.rs index b4d7dc2..087f9be 100644 --- a/core/examples/pc/debug.rs +++ b/core/examples/pc/debug.rs @@ -20,6 +20,8 @@ use structopt::StructOpt; use lazy_static::lazy_static; +const HISTORY_FILE: &'static str = ".gy.txt"; + #[derive(Debug)] struct CmdError(String); @@ -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"); } @@ -153,7 +155,7 @@ impl Debugger { } }; - let _ = rl.save_history("history.txt"); + let _ = rl.save_history(HISTORY_FILE); if abort { std::process::exit(1);