Optionally disable try_into impl
Hi, I know this request is a bit specific to my use case but it's becoming more and more of an issue as it is slowing down my workflow considerably.
I am using enum_dispatch on a few enums with a relatively large amount of variants - around 500 between all of them - for which enum_dispatch generates a try_into
impl that matches all variants in order to generate an error message.
I ran cargo-expand on my crate and all these impls end up generating more than 200.000 lines of code, which are slowing down the compile time of my crate from around 6 seconds to around a minute. My IDE is also considerably slower.
I tried patching enum_dispatch to not generate the try_into
s and indeed my compile is time back to normal, so that seems to be the root cause of the slowdown.
Would you consider adding a way to optionally disable the try_into
impls - maybe a cargo feature?
If you're ok with it I can work on this and submit a PR (I'm not familiar with GitLab but I assume a similar feature exists here).