From 8efd601eda7a59aa268fe5fe598e08eec81819d1 Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Sun, 26 Feb 2023 01:58:00 -0700 Subject: [PATCH] Try to fix err handle --- src-tauri/src/file_helpers.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src-tauri/src/file_helpers.rs b/src-tauri/src/file_helpers.rs index 635b244..35c1ce0 100644 --- a/src-tauri/src/file_helpers.rs +++ b/src-tauri/src/file_helpers.rs @@ -130,9 +130,7 @@ pub fn read_file(path: String) -> String { let mut file = match fs::File::open(path_buf) { Ok(file) => file, - Err(e) => { - // Send back error for handling by the caller - return null; + Err(e) => { return Err(e) // Send back error for handling by the caller } };