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

Replace error.rs with anyhow crate #39

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

crobinso
Copy link
Contributor

error.rs is largely a custom implementation of the popular
anyhow crate. This converts the codebase to use anyhow

  • error::Contextual import magic is now anyhow::Context

  • places where we were creating simple io::Error variants with
    custom strings, now use anyhow::Error via anyhow::anyhow! macro

  • places where we were creating error::Context errors to wrap an
    existing error, now use anyhow::Error::new

error.rs is largely a custom implementation of the popular
`anyhow` crate. This converts the codebase to use anyhow

* error::Contextual import magic is now anyhow::Context

* places where we were creating simple io::Error variants with
  custom strings, now use anyhow::Error via anyhow::anyhow! macro

* places where we were creating error::Context errors to wrap an
  existing error, now use anyhow::Error::new

Signed-off-by: Cole Robinson <crobinso@redhat.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.

2 participants