diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-04-18 12:38:34 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-04-18 12:39:39 -0400 |
| commit | b14cdec968445e1502ead497b00f49d5bb68c92a (patch) | |
| tree | 3885d4e1515e9c757d594ca5914292f953db0a4a /rust/src/lib.rs | |
| parent | b59b1a6076a3772128186db8fe97b5766f92a3fd (diff) | |
Rust API : Misc Changes and Improvements
Diffstat (limited to 'rust/src/lib.rs')
| -rw-r--r-- | rust/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 57b71cba..61016c0f 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -238,7 +238,10 @@ pub fn open_view<F: AsRef<Path>>(filename: F) -> Result<rc::Ref<binaryview::Bina } else { // TODO : add log prints println!("Opening view of type: `{}`", available_view.name()); - Some(available_view.open(&view).unwrap()) + match available_view.open(&view) { + Ok(view) => Some(view), + _ => None, + } } }); |
