-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Function anyhow::Ok
breaks Ok
pattern matching when wildcard importing
#201
Comments
Cross-crate glob imports are never supposed to be used for exactly this reason. Please see https://doc.rust-lang.org/1.56.0/cargo/reference/semver.html#minor-adding-new-public-items.
|
I've learnt something new, thanks. |
True, but in practice I think this change is going to cause confusion. It will break people's code, and most won't think to check the source for Why not include |
Please reconsider this move. You're basically saying it's ok to punish people from having been lazy and wrote a harmless-looking global include. Aggravated by the fact the function is hidden from the documentation and out of convention style. I have fixed my repos. But please, please, think of all these teams pulling their hair out right now and be nice to them. Please revert and yank this. |
Folks, this crate is made for me to use, in the way that I want to use it. If you want to use glob imports your options are:
|
When wildcard importing
anyhow
(use anyhow::*
), the recently added functionanyhow::Ok
breaks pattern-matching because it shadowsResult::Ok
and thus causes build failures:In my view, this is a breaking change.
It's quite convenient to import all of
anyhow
at once, so I'd suggest moving this function into a module. Or it would need a new major version, but this may be overkill for such a small change.The text was updated successfully, but these errors were encountered: