Try to fix err handle

This commit is contained in:
Thoronium
2023-02-26 01:58:00 -07:00
committed by GitHub
parent f2e3c69c0f
commit 8efd601eda

View File

@@ -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
}
};