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 Error::description and Error::cause #63

Closed

Conversation

AnderEnder
Copy link
Contributor

Error::description has been documented as soft-deprecated since 1.27.0 (17 months ago). It is going to be hard-deprecated soon(nightly/1.42). Error::cause has been documented as deprecated since 1.27.0, while Error::source was introduced.

This PR:

  • Removes all implementations of description in error type
  • Replaces cause with source

Related PR: rust-lang/rust#66919

@nox
Copy link
Owner

nox commented Jan 2, 2020

That's a breaking change and I'm not doing that any time soon.

@AnderEnder
Copy link
Contributor Author

@nox , so what your suggestion? Deprecation is already merged and will be released in 1.42.

@nox
Copy link
Owner

nox commented Jan 4, 2020

I have no suggestion, I'm just saying that I'm not going to merge this any time soon. It's not like the deprecation is going to prevent building this crate anyway.

@kentfredric
Copy link

I suspect you could add a source implementation and leave the cause implementations intact, that way people using the old interfaces don't get broken, and eases the pain for those migrating to the new one... I suspect.

@nox
Copy link
Owner

nox commented Jan 6, 2020

@kentfredric The breaking change here is increasing the Rust minimum version.

@nox
Copy link
Owner

nox commented Jan 6, 2020

Wtf, never mind, I completely forgot source was added ages ago, my bad.

@AnderEnder I'll merge your PR if you revert the removal of description and cause, and just add source.

@AnderEnder AnderEnder mentioned this pull request Jan 20, 2020
@AnderEnder AnderEnder closed this Jan 20, 2020
@AnderEnder
Copy link
Contributor Author

@nox, I have created a new PR with your suggestion.

bors bot added a commit that referenced this pull request Feb 10, 2020
64: Add Error::source r=nox a=AnderEnder

As discussed in #63 `Error::source` was added in `1.30.0`

This PR implements `Error::source`

Co-authored-by: Andrii Radyk <ander.ender@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants