From 975d99c3ed4aa48ca49857841ff80f4e732c3b1b Mon Sep 17 00:00:00 2001 From: Harishankar Date: Fri, 19 Jun 2020 22:51:05 +0530 Subject: [PATCH] Minor error handling fixed Added minor error handling for history save file --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d44387c..51ea94e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -254,7 +254,9 @@ fn run_interactive_mode (match_num : ®ex::Regex) { if rl.save_history (&hist_file.unwrap()).is_err () { eprintln! ("{}", SAVE_HISTORY_ERROR); } - } + } else { + eprintln! ("{}", &hist_file.unwrap_err()); + } } fn main() { -- 2.20.1