It looks like `tokio-rustls` is exporting `rustls:...
# development
h
It looks like
tokio-rustls
is exporting
rustls::ClientConfig
as
tokio_rustls::rustls::ClientConfig
. But they're being treated as distinct types I'm trying to use the crate
rustls_native_certs
, which creates a
rustls::RootCertStore
, then trying to set our
tokio_rustls::rustls::ClientConfig
to use it. But it's complaining that we need a
tokio_rustls::rustls::RootCertStore
, not
rustls::RootCertStore
Any idea how to get this re-export playing nicely?
I tried using
.into()
to no avail
h
it might be the case that the version of
rustls
tookio_rustls
is using internally is not the same as the version pants is using, which would make them different types
šŸ‘ 1
I wonder if we could manually convert from one type to another
h
So, play with versions in Cargo.toml? I have this now
Copy code
rustls = "0.19"
rustls-native-certs = "0.5"
tokio = { version = "0.2.23", features = ["process", "rt-threaded", "sync", "tcp", "time"] }
tokio-rustls = "0.14"
h
they're probably substantially the same, so if the visiblity rules allow it maybe we could manually construct a version of the type we're actually using from the version tokio_rustls is using
a
Yeah,
cargo tree
will help you explore what's going on šŸ™‚
šŸ‘ 1
Almost certainly your easiest path forwards is to change your version of one of the libraries to match what the other expects
šŸ‘ 1
h
Hm still getting the error with the versions being the same.
Copy code
āÆ ./cargo tree | grep rustls
ā”‚   ā”‚   ā”‚       ā”œā”€ā”€ rustls-native-certs v0.4.0
ā”‚   ā”‚   ā”‚       ā”‚   ā”œā”€ā”€ rustls v0.18.1
ā”‚   ā”‚   ā”‚       ā”œā”€ā”€ tokio-rustls v0.14.1
ā”‚   ā”‚   ā”‚       ā”‚   ā”œā”€ā”€ rustls v0.18.1 (*)
COnfirmed that all deps are using
rustls 0.18.1
across the board too
Oh wait nvm, it just worked! Yay
šŸ‘ 1
a
šŸ˜„