Expand InstallerError enum;

This commit is contained in:
Nathan Fisher 2023-04-08 11:45:39 -04:00
parent 784069402d
commit 1a4d202989
1 changed files with 3 additions and 0 deletions

View File

@ -35,10 +35,12 @@ impl<T: io::Read> Installer<T> {
mod error {
use std::{io, fmt, error::Error};
use hpk_package::tar;
#[derive(Debug)]
pub enum InstallError {
IO(io::Error),
Tar(tar::Error),
}
impl fmt::Display for InstallError {
@ -51,6 +53,7 @@ mod error {
fn source(&self) -> Option<&(dyn Error + 'static)> {
match self {
Self::IO(e) => Some(e),
Self::Tar(e) => Some(e),
}
}
}