We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
()
anyhow::Result
WARNING: This issues is a matter of style and taste! :)
I have a lot of anyhow::Result<()> in my code base. I find it ugly.
anyhow::Result<()>
If we change the definition of anyhow::Result from
pub type Result<T, E = Error> = core::result::Result<T, E>;
to
pub type Result<T = (), E = Error> = core::result::Result<T, E>;
Then we could rewrite
fn foo() -> anyhow::Result<()> { … }
fn foo() -> anyhow::Result { … }
This would NOT be a breaking change (afaict).
The text was updated successfully, but these errors were encountered:
I would prefer not to make this change.
You can write your own Result type alias in your crate.
Sorry, something went wrong.
Fair enough!
No branches or pull requests
WARNING: This issues is a matter of style and taste! :)
I have a lot of
anyhow::Result<()>
in my code base. I find it ugly.If we change the definition of
anyhow::Result
fromto
Then we could rewrite
to
This would NOT be a breaking change (afaict).
The text was updated successfully, but these errors were encountered: