rrevenantt / better_any

Better type id and Any for Rust
Apache License 2.0
11 stars 5 forks source link

Use absolute paths to traits in derive macro output #2

Open ColonelThirtyTwo opened 3 years ago

ColonelThirtyTwo commented 3 years ago

Allows the user to use the macros without needing to import types that are textually unused.

rrevenantt commented 3 years ago

Initially I have thought that both traits will be used(and thus imported) by user anyway. But now I also found that it is not always the case.

Your solution would prevent users from re-importing macro or renaming crate in Cargo.toml. I think it would be better to just rename derive macro to correspond to trait that is directly being implemented in it i.e., Tidable, so both macro and trait are imported by single use statement.