fix: use let err instead of match in restore xr files func

This commit is contained in:
Gabriele Musco 2024-11-29 19:37:16 +01:00
commit 2217f84ff4
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE

View file

@ -50,18 +50,16 @@ fn restore_steam_xr_files() {
let openvrpaths = get_current_openvrpaths();
if let Some(ar) = active_runtime {
if !file_builders::active_runtime_json::is_steam(&ar) {
match set_current_active_runtime_to_steam() {
Ok(_) => {}
Err(e) => eprintln!("Warning: failed to restore active runtime to steam: {e}"),
};
if let Err(e) = set_current_active_runtime_to_steam() {
eprintln!("Warning: failed to restore active runtime to steam: {e}");
}
}
}
if let Some(ovrp) = openvrpaths {
if !file_builders::openvrpaths_vrpath::is_steam(&ovrp) {
match set_current_openvrpaths_to_steam() {
Ok(_) => {}
Err(e) => eprintln!("Warning: failed to restore openvrpaths to steam: {e}"),
};
if let Err(e) = set_current_openvrpaths_to_steam() {
eprintln!("Warning: failed to restore openvrpaths to steam: {e}");
}
}
}
restore_runtime_entrypoint();