|
|
@ -1,20 +1,14 @@
|
|
|
|
Compiling futuretest v0.1.0 (file:///mnt/d/GIT/futuretest)
|
|
|
|
Compiling futuretest v0.1.0 (file:///mnt/c/Users/Mahmoud/git/futuretest)
|
|
|
|
error[E0308]: match arms have incompatible types
|
|
|
|
error[E0277]: the trait bound `(): futures::Future` is not satisfied
|
|
|
|
--> src/main.rs:21:13
|
|
|
|
--> src/main.rs:17:1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 | / match err {
|
|
|
|
17 | / fn test() -> MapErr<(), ()> {
|
|
|
|
22 | | ErrorCode::Case1 => case1(),
|
|
|
|
18 | | future::ok(())
|
|
|
|
23 | | ErrorCode::Case2 => case2(),
|
|
|
|
19 | | .map_err(|String| ())
|
|
|
|
24 | | }
|
|
|
|
20 | | }
|
|
|
|
| |_____________^ expected anonymized type, found a different anonymized type
|
|
|
|
| |_^ the trait `futures::Future` is not implemented for `()`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= note: expected type `impl futures::Future` (anonymized type)
|
|
|
|
= note: required by `futures::MapErr`
|
|
|
|
found type `impl futures::Future` (anonymized type)
|
|
|
|
|
|
|
|
note: match arm with an incompatible type
|
|
|
|
|
|
|
|
--> src/main.rs:23:37
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 | ErrorCode::Case2 => case2(),
|
|
|
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
|
|
|
|