Skip to content

Commit

Permalink
chore(elan-dist): more error chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Apr 12, 2018
1 parent e20b59c commit 6aae5fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elan-dist/src/component/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ impl<'a> ZipPackage<'a> {
_ => (),
};

let mut dst = File::create(full_path)?;
io::copy(&mut entry, &mut dst)?;
let mut dst = File::create(full_path).chain_err(|| ErrorKind::ExtractingPackage)?;
io::copy(&mut entry, &mut dst).chain_err(|| ErrorKind::ExtractingPackage)?;
}

Ok(())
Expand Down

0 comments on commit 6aae5fb

Please sign in to comment.