Minor error handling fixed master
authorHarishankar <v.harishankar@gmail.com>
Fri, 19 Jun 2020 17:21:05 +0000 (22:51 +0530)
committerHarishankar <v.harishankar@gmail.com>
Fri, 19 Jun 2020 17:21:05 +0000 (22:51 +0530)
Added minor error handling for history save file

src/main.rs

index d44387c..51ea94e 100644 (file)
@@ -254,7 +254,9 @@ fn run_interactive_mode (match_num : &regex::Regex) {
                if rl.save_history (&hist_file.unwrap()).is_err () {
                        eprintln! ("{}", SAVE_HISTORY_ERROR);
                }
-       } 
+       } else {
+               eprintln! ("{}", &hist_file.unwrap_err());
+       }
 }
 
 fn main() {