Closed GeoffClements closed 3 years ago
I think it needs importing std::io::Read
trait in is_sync
implementation to enable self.inner.read(buf)
call.
Try adding Read in import:
#[cfg(feature = "is_sync")]
use std::io::{self, Read};
It was my configuration Cargo.toml that was causing the problem.
I should have had:
[dependencies]
async-std = "1.9"
maybe-async = "0.2"
[features]
is_sync = ["maybe-async/is_sync"]
I think it was the example in the README that threw me. Anyway, closing.
Thanks!
I have created a minimal example to show this problem:
main.rs
Cargo.toml