You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Progenitor has an enum called Error, so if you try import std::error::Error you'll get errors about it being defined multiple times, along with an onslaught of other type errors due to the compiler trying to match the uses of Error to your enum
Maybe the enum should be renamed something else less generic to prevent clashes with code already in use, or at least a warning in the README about it?
I understand completely if you consider this a non-problem though too, just wanted to make the suggestion
error[E0252]: the name `Error` is defined multiple times
--> /home/kamwithk/repos/funkyduck/target/debug/build/funkyduck-693277bb923d1a99/out/codegen.rs:2:41
|
2 | pub use progenitor_client::{ByteStream, Error, ResponseValue};
| ^^^^^ `Error` reimported here
|
::: src/main.rs:4:5
|
4 | use std::error::Error;
| ----------------- previous import of the trait `Error` here
|
= note: `Error` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
--> src/main.rs:4:22
|
4 | use std::error::Error as OtherError;
| +++++++++++++
The text was updated successfully, but these errors were encountered:
It's a good suggestion. We've been trending in a direction of explicit naming, and I think that's probably the approach we should take here: fully qualify the types we use and avoid the import.
In your case, you might be able to wrap your generated code in a mod my_client { .. }
Progenitor has an enum called
Error
, so if you try importstd::error::Error
you'll get errors about it being defined multiple times, along with an onslaught of other type errors due to the compiler trying to match the uses of Error to your enumMaybe the enum should be renamed something else less generic to prevent clashes with code already in use, or at least a warning in the README about it?
I understand completely if you consider this a non-problem though too, just wanted to make the suggestion
The text was updated successfully, but these errors were encountered: