|
|
@ -1,14 +1,22 @@
|
|
|
|
Compiling futuretest v0.1.0 (file:///mnt/c/Users/Mahmoud/git/futuretest)
|
|
|
|
Compiling futuretest v0.1.0 (file:///mnt/d/GIT/futuretest)
|
|
|
|
error[E0277]: the trait bound `(): futures::Future` is not satisfied
|
|
|
|
error[E0308]: match arms have incompatible types
|
|
|
|
--> src/main.rs:17:1
|
|
|
|
--> src/main.rs:28:13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 | / fn test() -> MapErr<(), ()> {
|
|
|
|
28 | / match err {
|
|
|
|
18 | | future::ok(())
|
|
|
|
29 | | ErrorCode::CanHandleWithAsync => async_error_handler()
|
|
|
|
19 | | .map_err(|String| ())
|
|
|
|
30 | | .map_err(|_| ErrorCode::CannotHandle).wait(),
|
|
|
|
20 | | }
|
|
|
|
31 | | ErrorCode::CanHandleWithSync => future::result(sync_error_handler()),
|
|
|
|
| |_^ the trait `futures::Future` is not implemented for `()`
|
|
|
|
32 | | ErrorCode::CannotHandle => future::err(ErrorCode::CannotHandle),
|
|
|
|
|
|
|
|
33 | | }
|
|
|
|
|
|
|
|
| |_____________^ expected enum `std::result::Result`, found struct `futures::FutureResult`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= note: required by `futures::MapErr`
|
|
|
|
= note: expected type `std::result::Result<(), ErrorCode>`
|
|
|
|
|
|
|
|
found type `futures::FutureResult<(), ErrorCode>`
|
|
|
|
|
|
|
|
note: match arm with an incompatible type
|
|
|
|
|
|
|
|
--> src/main.rs:31:49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 | ErrorCode::CanHandleWithSync => future::result(sync_error_handler()),
|
|
|
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
|
|
|
|