Skip to content

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

Merged
ramosbugs merged 1 commit intoramosbugs:mainfrom
Traverse-Research:reqwest-unify-error-types
Nov 28, 2023
Merged

reqwest: Migrate to shared Error type and use thiserror's From impl#238
ramosbugs merged 1 commit intoramosbugs:mainfrom
Traverse-Research:reqwest-unify-error-types

Conversation

@MarijnS95
Copy link
Copy Markdown
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
Copy Markdown
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!

…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
@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