Skip to content

Commit

Permalink
Update deps and fix compiling errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
yonas committed Jul 8, 2024
1 parent bd3e45f commit 813ce80
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 102 deletions.
204 changes: 118 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use fmt::Format;
#[derive(Debug)]
#[allow(dead_code)]
pub enum CliError {
Semver(Box<Error>, String),
Semver(Box<dyn Error>, String),
Generic(String),
Unknown
}
Expand Down Expand Up @@ -41,7 +41,7 @@ impl CliError {

impl Display for CliError {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
write!(f, "{} {}", Format::Error("error:"), self.description())
write!(f, "{} {}", Format::Error("error:"), self)
}
}

Expand All @@ -55,7 +55,7 @@ impl Error for CliError {
}
}

fn cause(&self) -> Option<&Error> {
fn cause(&self) -> Option<&dyn Error> {
match *self {
CliError::Semver(ref e, _) => Some(&**e),
CliError::Generic(..) => None,
Expand All @@ -66,6 +66,6 @@ impl Error for CliError {

impl From<ClogErr> for CliError {
fn from(ce: ClogErr) -> Self {
CliError::Generic(ce.description().to_owned())
CliError::Generic(ce.to_string().to_owned())
}
}
Loading

0 comments on commit 813ce80

Please sign in to comment.