From dfd2b29120baa6d86ab6e76ab5f940dec63ffe37 Mon Sep 17 00:00:00 2001 From: tanakalian <132448622+tanakalian@users.noreply.github.com> Date: Thu, 4 May 2023 01:28:19 +0100 Subject: Fixed calling open_view on a bndb with an invalid view would panic as unwrap was called. Fixed by matching to handle the error case --- rust/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rust/src') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 61358e6c..aa4f7efb 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -234,7 +234,10 @@ pub fn open_view>(filename: F) -> Result Some(view), + _ => None + } } else { // TODO : add log prints println!("Opening view of type: `{}`", available_view.name()); -- cgit v1.3.1