So I am trying to write a piece of Rust code that would open a file in one location and, if unsuccessful, open it in another.
let f =open::that("assets/maps.png");
match f {
Ok(file) => file,
Err(error) => {
open::that("assets/map/maps.png").unwrap();
},
};
This caused the error: expected struct `std::process::ExitStatus`, found `()
I am new to this language, so I am not sure how to handle this problem, so if you can, please help. Thank you.