-
-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Description
When wildcard importing anyhow
(use anyhow::*
), the recently added function anyhow::Ok
breaks pattern-matching because it shadows Result::Ok
and thus causes build failures:
error[E0532]: expected tuple struct or tuple variant, found function `Ok`
--> src\utils.rs:199:13
|
199 | Ok(result) => {
| ^^ not a tuple struct or tuple variant
|
::: src\python.rs:12:23
|
12 | let version_str = cmd_output!(PYTHON, "--version")
| -------------------------------- in this macro invocation
|
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.
Metadata
Metadata
Assignees
Labels
No labels