Merge pull request #402 from ouch-org/use-try-hehe

This commit is contained in:
figsoda 2023-04-16 23:20:18 -04:00 committed by GitHub
commit 3cb7274fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,10 +117,7 @@ where
Err(e) => return Some(Err(e.into())),
};
let path = match file.enclosed_name() {
Some(path) => path.to_owned(),
None => return None,
};
let path = file.enclosed_name()?.to_owned();
let is_dir = file.is_dir();
Some(Ok(FileInArchive { path, is_dir }))