mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 10:54:38 +00:00
Remove unwrap
This commit is contained in:
parent
9c9be74946
commit
1eb4c1cc77
1 changed files with 4 additions and 1 deletions
|
@ -363,7 +363,10 @@ fn unpack(aes_key: Option<aes::Aes256>, action: ActionUnpack) -> Result<(), repa
|
|||
fs::create_dir_all(&entry.out_dir)?;
|
||||
pak.read_file(
|
||||
&entry.entry_path,
|
||||
&mut BufReader::new(file.as_ref().unwrap()), // TODO: avoid this unwrap
|
||||
&mut BufReader::new(
|
||||
file.as_ref()
|
||||
.map_err(|e| repak::Error::Other(format!("error reading pak: {e}")))?,
|
||||
),
|
||||
&mut fs::File::create(&entry.out_path)?,
|
||||
)?;
|
||||
progress.inc(1);
|
||||
|
|
Loading…
Reference in a new issue