From 476593397ad515410e5ac366ca9cd09c090c89c4 Mon Sep 17 00:00:00 2001 From: Chinmay Dalal Date: Mon, 13 Nov 2023 18:16:33 +0530 Subject: [PATCH] remove panicking functions --- src/hinter/cwd_aware.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hinter/cwd_aware.rs b/src/hinter/cwd_aware.rs index e27b4727..c5c43815 100644 --- a/src/hinter/cwd_aware.rs +++ b/src/hinter/cwd_aware.rs @@ -39,7 +39,7 @@ impl Hinter for CwdAwareHinter { Err(err) } }) - .expect("todo: error handling"); + .unwrap_or_default(); if !with_cwd.is_empty() { with_cwd[0] .command_line @@ -52,7 +52,7 @@ impl Hinter for CwdAwareHinter { line.to_string(), history.session(), )) - .expect("todo: error handling") + .unwrap_or_default() .get(0) .map_or_else(String::new, |entry| { entry