Rust 使用clickhouse依赖项运行货物生成时出错

Rust 使用clickhouse依赖项运行货物生成时出错,rust,rust-cargo,Rust,Rust Cargo,我按照说明将其添加到我的cargo toml文件中 但是当我运行cargo build时,我得到一个失败提示: Compiling clickhouse v0.6.3 error[E0433]: failed to resolve: could not find `test` in `tokio` --> /Users/gudjonragnar/.cargo/registry/src/github.com-1ecc6299db9ec823/clickhouse-0.6.3/sr

我按照说明将其添加到我的cargo toml文件中

但是当我运行
cargo build
时,我得到一个失败提示:

   Compiling clickhouse v0.6.3
error[E0433]: failed to resolve: could not find `test` in `tokio`
   --> /Users/gudjonragnar/.cargo/registry/src/github.com-1ecc6299db9ec823/clickhouse-0.6.3/src/compression/lz4.rs:163:10
    |
163 | #[tokio::test]
    |          ^^^^ could not find `test` in `tokio`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: could not compile `clickhouse`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
我是个新手,所以我不知道在这里该怎么办,有什么想法吗


如果相关的话,我正在MacOS BigSur上运行。

我在Linux上也遇到了这个错误。这似乎是clickhouse板条箱中的问题,但可以在Cargo.toml中修复
#[tokio::test]
指既需要“rt”功能又需要“macros”功能的,但clickhouse板条箱中的Cargo.toml文件仅包括“rt”功能。为了添加此功能,以便板条箱能够编译,您可以在Cargo.toml for tokio中添加一行,以启用该功能:

tokio = { version = "1.0.1", features = ["rt", "macros"] }
添加此行为我修复了编译器错误


我注意到还有另一个板条箱,这可能也很有用,因为我发现它可以工作,但我不需要东京(至少现在还不需要)。我确实在库的问题板上发布了一个问题,它在版本0.6.4中得到了解决:。
tokio = { version = "1.0.1", features = ["rt", "macros"] }