【发布时间】:2018-11-16 18:17:38
【问题描述】:
在 lib.rs 我有这个:
extern crate tokio_core;
use tokio_core::channel::{channel, Sender, Receiver};
最终出现此错误:
error[E0432]: unresolved import `tokio_core::channel`
--> src/main.rs:2:17
|
2 | use tokio_core::channel::{channel, Sender, Receiver};
| ^^^^^^^ Could not find `channel` in `tokio_core`
查看tokio_core crate's lib.rs file,它像这样导出channel:
#[doc(hidden)]
pub mod channel;
对于我的一生,我无法弄清楚为什么这不起作用。我在 Rust 1.29 和 1.30.1 上都试过这个。
【问题讨论】:
标签: rust rust-tokio