Skip to content

Commit

Permalink
fix: Remove unnecessary unwraps (#1000)
Browse files Browse the repository at this point in the history
We already have `anyhow` for boxing the error so we can just bubble it up
  • Loading branch information
GeckoEidechse committed Aug 14, 2024
1 parent b244082 commit 41139fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/mod_management/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 41139fb

Please sign in to comment.