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

reqwest: Migrate to shared Error type and use thiserror's From impl #238

Merged

Conversation

MarijnS95
Copy link
Contributor

reqwest no longer has a separate error type for sync and async implementations. In addition thiserror can generate From implementations for automatic conversions in the Try (?) operator.

Finally, delete some unnecessary #[cfg] wraps that are already guarding the module as a whole, and that the code won't compile without anyway.

Copy link
Owner

@ramosbugs ramosbugs left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

src/reqwest.rs Show resolved Hide resolved
src/reqwest.rs Show resolved Hide resolved
…impl

`reqwest` no longer has a separate error type for sync and async
implementations.  In addition `thiserror` can generate `From`
implementations for automatic conversions in the `Try` (`?`) operator.

Finally, delete some unnecessary `#[cfg]` wraps that are already
guarding the module as a whole, and that the code won't compile without
anyway.
@MarijnS95 MarijnS95 force-pushed the reqwest-unify-error-types branch from af16d4d to b02f9cf Compare November 28, 2023 15:59
@ramosbugs ramosbugs merged commit 8c31046 into ramosbugs:main Nov 28, 2023
4 checks passed
@MarijnS95 MarijnS95 deleted the reqwest-unify-error-types branch November 28, 2023 23:38
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