From 2217f84ff4bf3141557ae848b6ff7b3e6eed62ae Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Fri, 29 Nov 2024 19:37:16 +0100 Subject: [PATCH] fix: use let err instead of match in restore xr files func --- src/main.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2185480..db1d7fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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();