mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
minor, use Try
This commit is contained in:
parent
9c06a68964
commit
d926e0f00a
@ -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 }))
|
||||
|
Loading…
x
Reference in New Issue
Block a user