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

the ? operator cannot be applied to type Wrapped<()> #37

Closed
IgnisDa opened this issue Jul 7, 2024 · 3 comments · Fixed by #38
Closed

the ? operator cannot be applied to type Wrapped<()> #37

IgnisDa opened this issue Jul 7, 2024 · 3 comments · Fixed by #38
Labels
enhancement New feature or request

Comments

@IgnisDa
Copy link

IgnisDa commented Jul 7, 2024

Please describe your feature request

It would be great if std::ops::Try is implemented for Wrapped<()>

Additional context

No response

@IgnisDa IgnisDa added the enhancement New feature or request label Jul 7, 2024
@IgnisDa IgnisDa changed the title the ? operator cannot be applied to type Wrapped<()> the ? operator cannot be applied to type Wrapped<()> Jul 7, 2024
@IgnisDa
Copy link
Author

IgnisDa commented Jul 7, 2024

In fact, it would be great if it behaves like a rust Result so that I can perform those operations (.unwrap(), .ok()) on it.

@Jonxslays
Copy link
Owner

Thats a great point. I will look into this.

@Jonxslays
Copy link
Owner

As of v0.4.0 the methods that previously returned a Wrapped<T> now return a Result<T, HttpError>. Thanks @IgnisDa for the suggestion, it feels much more idiomatic. This should solve the DX issues you were experiencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants