Hello,
I would like to know how can I use a dependency of a dependency without declaring it in Cargo.toml? Is it possible?
Thanks.
Hello,
I would like to know how can I use a dependency of a dependency without declaring it in Cargo.toml? Is it possible?
Thanks.
If the dependency exports it's dependency, you will be able to use it without importing it.
For example, If a dependency crate uses tokio and exports it by:
pub use tokio;
You will be able to use it by using use dependency::tokio;
.
Yes, that works. So it's like module, it needs to be exported otherwise it's private. Is that right?
As far as I know, it's like a module
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.