Open
Description
I have a library that depends on h2
transitively via hyper
. The hyper/client
feature is enabled but hyper/server
is not. My compiled binary contains <h2::server::Peer as h2::proto::Peer>::convert_poll_message
which doesn't seem like it should ever be used.
I suspect, but haven't been able to confirm, that this is due to proto::Dyn::convert_poll_message
. Since the Rust compiler doesn't know that the Dyn::Server
variant is never constructed, it must generate the handling code for it.
Would it be possible to introduce features for "client" and "server" code generation, and then only define the Dyn
variant when the respective feature is enabled?
Metadata
Metadata
Assignees
Labels
No labels