Skip to content

Cleanup error types #688

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

Merged
merged 5 commits into from
Feb 24, 2020
Merged

Cleanup error types #688

merged 5 commits into from
Feb 24, 2020

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Feb 19, 2020

Checklist

  • n/a I've added tests for all code changes and additions (where applicable)
  • n/a I've added a demonstration of the new feature to one or more examples
  • I've updated the book to reflect my changes
  • n/a Usage of new public items is shown in the API docs

API changes

  • Use #[non_exhaustive] for error::Error instead of __NonExhaustive trick. This is a breaking change, and requires a minimal Rust version of 1.40 (previously 1.38). This notably enables to add new error types without it being a breaking change.
  • Change std::error::Error implementation of different error types, to use "state of the art" functions instead of deprecated ones.
  • Deprecated NoError and use std::convert::Infallible, and re-export the latter as NoError for a smoother transition (maybe we should remove completly). This will also allow a smoother transition to never type when it is stabilized.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@azriel91 azriel91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR ✌️!
Small change + please could you also add a changelog entry? (edit: can copy paste the API changes part of your comment and link to this PR)
Should be good to go after that.

@azriel91
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 24, 2020

Build succeeded

@bors bors bot merged commit a36f00a into amethyst:master Feb 24, 2020
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.

None yet

2 participants