Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Commit

Permalink
allow deprecated Error::description
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderEnder committed Jan 1, 2020
1 parent d31288b commit 99ffdac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/error_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ macro_rules! impl_error_chain_processed {
}

impl ::std::error::Error for $error_name {
#[allow(deprecated)]
fn description(&self) -> &str {
self.description()
}
Expand Down Expand Up @@ -356,6 +357,7 @@ macro_rules! impl_error_chain_processed {

impl_error_chain_kind! {
/// The kind of an error.
#[allow(deprecated)]
#[derive(Debug)]
pub enum $error_kind_name {
$(
Expand All @@ -369,6 +371,7 @@ macro_rules! impl_error_chain_processed {
$(
$(#[$meta_foreign_links])*
$foreign_link_variant(err: $foreign_link_error_path) {
#[allow(deprecated)]
description(::std::error::Error::description(err))
display("{}", err)
}
Expand Down

0 comments on commit 99ffdac

Please sign in to comment.