minor, use Try

This commit is contained in:
João M. Bezerra 2023-04-16 22:57:54 -03:00
parent 9c06a68964
commit d926e0f00a

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 }))