Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Rust futures error
error: no method named `then` found for type `futures::AndThen<std::boxed::Box<futures::Future<Error=std::io::Error, Item=std::boxed::Box<futures::Stream<Error=std::io::Error, Item=()> + std::marker::Send>> + std::marker::Send>, std::boxed::Box<futures::Stream<Error=std::io::Error, Item=()> + std::marker::Send>, [closure@src/main.rs:100:19: 100:66]>` in the current scope
--> src/main.rs:101:10
|
101 | .then(|_| ());
| ^^^^
|
= note: the method `then` exists but the following trait bounds were not satisfied: `std::boxed::Box<futures::Stream<Error=std::io::Error, Item=()> + std::marker::Send> : futures::IntoFuture`, `futures::AndThen<std::boxed::Box<futures::Future<Error=std::io::Error, Item=std::boxed::Box<futures::Stream<Error=std::io::Error, Item=()> + std::marker::Send>> + std::marker::Send>, std::boxed::Box<futures::Stream<Error=std::io::Error, Item=()> + std::marker::Send>, [closure@src/main.rs:100:19: 100:66]> : futures::Future`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment