Closed djc closed 2 years ago
(Failure is unrelated, fixed in #1316.)
Hello there! I'm surprised that the with_transport_config
setters take an Arc<TransportConfig>
instead of a plain TransportConfig
. Shouldn't it be the latter instead since TransportConfig
is a concrete type rather than a dyn
object (in which case the Arc
is actually necessary)?
Although it is honest to its internal representation, shouldn't the user code not have to worry about wrapping it in an Arc
first?
I would say this is actually useful. For example, if you have multiple endpoints with the same TransportConfig
, you can now share the same TransportConfig
. Additionally it can often be useful to have the caller supply the exact type you need, rather than the callee taking care of some conversion (arguably my example is just one specific example of that same principle).
If you have multiple endpoints with the same
TransportConfig
, you can now share the sameTransportConfig
.
Fair point. I'm convinced. 🎉
Fixed the commit message.
Fixes #1301.