我需要在项目中同时使用futures-preview
和futures
。我的Cargo.toml看起来像:
[dependencies]
futures-preview = "= 0.3.0-alpha.7"
futures = "0.1.25"
现在,当我这样做时,在我的lib.rs
中
extern crate futures;
对于使用哪种期货板条箱,罗斯特感到困惑。如何同时使用两个具有相同extern crate
名称的板条箱?
Compiling spdk-rs v0.1.0 (/home/zeyuanhu/share/rustfs/spdk-rs)
error[E0465]: multiple rlib candidates for `futures` found
--> /home/zeyuanhu/share/rustfs/spdk-rs/src/lib.rs:17:1
|
17 | extern crate futures;
| ^^^^^^^^^^^^^^^^^^^^^
|
note: candidate #1: /home/zeyuanhu/share/rustfs/examples/hello_nvme_bdev_rust_wrapper/target/debug/deps/libfutures-ac8c40146fd4a4e0.rlib
--> /home/zeyuanhu/share/rustfs/spdk-rs/src/lib.rs:17:1
|
17 | extern crate futures;
| ^^^^^^^^^^^^^^^^^^^^^
note: candidate #2: /home/zeyuanhu/share/rustfs/examples/hello_nvme_bdev_rust_wrapper/target/debug/deps/libfutures-44db24e7af1a2bd3.rlib
--> /home/zeyuanhu/share/rustfs/spdk-rs/src/lib.rs:17:1
|
17 | extern crate futures;
| ^^^^^^^^^^^^^^^^^^^^^
error[E0463]: can't find crate for `futures`
--> /home/zeyuanhu/share/rustfs/spdk-rs/src/lib.rs:17:1
|
17 | extern crate futures;
| ^^^^^^^^^^^^^^^^^^^^^ can't find crate