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

[Enhancement] Add Implicit conversion from Error to FailResult #159

Closed
RHaughton opened this issue Oct 27, 2022 · 4 comments
Closed

[Enhancement] Add Implicit conversion from Error to FailResult #159

RHaughton opened this issue Oct 27, 2022 · 4 comments

Comments

@RHaughton
Copy link
Contributor

RHaughton commented Oct 27, 2022

Just like the Implicit Conversion to Ok Result.

just return;
return new Error("msg");

instead of :
return Result.Fail(new Error("msg");

@RHaughton
Copy link
Contributor Author

just added a pull request : #160

@altmann
Copy link
Owner

altmann commented Oct 28, 2022

Thanks for your feedback. I think its a good idea. I reviewed your pr and left some comments.

@RHaughton
Copy link
Contributor Author

Just made the necessary changes and added the unit tests. Let me know what you think.

@altmann
Copy link
Owner

altmann commented Feb 4, 2023

@altmann altmann closed this as completed Feb 4, 2023
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

No branches or pull requests

2 participants