Error handle fix

This commit is contained in:
Thoronium
2023-02-26 02:10:55 -07:00
committed by GitHub
parent 8efd601eda
commit d49fdacf2a

View File

@@ -130,8 +130,7 @@ pub fn read_file(path: String) -> String {
let mut file = match fs::File::open(path_buf) {
Ok(file) => file,
Err(e) => { return Err(e) // Send back error for handling by the caller
}
Err(e) => return String.from::(""); // Send back error for handling by the caller
};
let mut contents = String::new();