Unable to use tokio_io::BufStream

I am trying to use the new tokio-io-0.2.0-alpha.6 BufStream. But when I do

use tokio_io::BufStream

I get the error as follows

unresolved import tokio_io::BufStream

no BufStream in the root rustc(E0432)

I am using VSCode and that provides autocompletion for the BufStream struct. But this happens when I try to compile the code.
Any solutions? Thanks.

Make sure you have the io-util feature enabled in your Cargo.toml:

tokio = { version = "0.2", features = ["io-util"] }

I have enabled all the features

tokio = {version = "0.2.10", features=["full"]}

Even then I have this problem

tokio::io::BufStream, not tokio_io::BufStream.

1 Like

Weird! The vscode even gave me autocomplete for this. hmmm...
Thanks a lot

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.