mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 08:34:43 +01:00
Error handle fix
This commit is contained in:
@@ -130,8 +130,7 @@ pub fn read_file(path: String) -> String {
|
|||||||
|
|
||||||
let mut file = match fs::File::open(path_buf) {
|
let mut file = match fs::File::open(path_buf) {
|
||||||
Ok(file) => file,
|
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();
|
let mut contents = String::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user