Suggested by Adrian in discord:
Hey there, seems like hyper-rustls' with_provider_and_* methods take a CryptoProvider, meaning that it's impossible to call CryptoProvider::get_default() in a library and pass that as the argument (since getting an owned value out of the Arc is not really possible). I think the API should take an Arc, just like rustls' ClientConfig::with_provider, which it calls internally (by creating an Arc via .into()).
Ctz mentioned impossible might be an overstatement (e.g. due to Arc::unwrap_or_clone()) but in general there was agreement that the API should be changed to take an Arc.
We should consider making this change alongside future breaking API changes.
Suggested by
Adrianin discord:Ctz mentioned impossible might be an overstatement (e.g. due to
Arc::unwrap_or_clone()) but in general there was agreement that the API should be changed to take anArc.We should consider making this change alongside future breaking API changes.