Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated method Error::description #74

Merged
merged 1 commit into from Apr 6, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

remove deprecated method Error::description

  • Loading branch information
antonok-edm committed Feb 12, 2020
commit e472d5d2c5b473a59862bd58bf6c8912eef676ba
@@ -164,13 +164,15 @@ macro_rules! simple_enum_error {
)+
}

impl Error for ParseError {
fn description(&self) -> &str {
impl Error for ParseError {}

impl fmt::Display for ParseError {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
match *self {
$(
ParseError::$name => $description,
)+
}
}.fmt(fmt)
}
}
}
@@ -194,12 +196,6 @@ simple_enum_error! {
#[cfg(feature = "heapsize")]
known_heap_size!(0, ParseError);

impl fmt::Display for ParseError {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
self.description().fmt(fmt)
}
}

impl From<idna::Errors> for ParseError {
fn from(_: idna::Errors) -> ParseError { ParseError::IdnaError }
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.