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
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?
The text was updated successfully, but these errors were encountered:
I have a library that depends on
h2
transitively viahyper
. Thehyper/client
feature is enabled buthyper/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 theDyn::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?The text was updated successfully, but these errors were encountered: