error[E0277]: the trait bound `(): futures::Future` is not satisfied
error[E0271]: type mismatch resolving `<futures::FutureResult<(), std::string::String> as futures::IntoFuture>::Error == &str`
--> src/main.rs:17:1
--> src/main.rs:12:10
|
|
17 | / fn test() -> MapErr<(), ()> {
12 | .and_then(|_|
18 | | future::ok(())
| ^^^^^^^^ expected struct `std::string::String`, found &str
19 | | .map_err(|String| ())
20 | | }
| |_^ the trait `futures::Future` is not implemented for `()`
|
|
= note: required by `futures::MapErr`
= note: expected type `std::string::String`
found type `&str`
error: aborting due to previous error
error[E0599]: no method named `and_then` found for type `futures::AndThen<futures::MapErr<futures::FutureResult<(), ()>, [closure@src/main.rs:11:18: 11:42]>, futures::FutureResult<(), std::string::String>, [closure@src/main.rs:12:19: 15:14]>` in the current scope