From 41139fb5546c19d27771ea6807cbdab17247424c Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:40:39 +0200 Subject: fix: Remove unnecessary unwraps (#1000) We already have `anyhow` for boxing the error so we can just bubble it up --- src-tauri/src/mod_management/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-tauri/src/mod_management') diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index 2a018920..52ef1180 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -244,8 +244,8 @@ pub fn parse_mods_in_package( // Get list of folders in `mods` directory for path in paths { - let my_path = path.unwrap().path(); - let md = std::fs::metadata(my_path.clone()).unwrap(); + let my_path = path?.path(); + let md = std::fs::metadata(my_path.clone())?; if md.is_dir() { directories.push(my_path); } -- cgit v1.2.3