Public
Authored by Nathan A Sculli

Rust actix actor chain with join

I'm trying to get an understanding of how to chain together calls to different actors. I think I'm way off base here, hopefully someone can point me in a better direction. I've included the compile error below:


error[E0308]: match arms have incompatible types
   --> src/main.rs:130:25
    |
130 |           .and_then(|res| match res {
    |  _________________________^
131 | |             (Err(e), _) => actix::fut::err(SumError::from(e)),
132 | |             (_, Err(e)) => actix::fut::err(SumError::from(e)),
133 | |             (Ok(a), Ok(b)) => state.sum.send(Sum { a, b }),
    | |                               ---------------------------- match arm with an incompatible type
134 | |         })
    | |_________^ expected struct `actix::fut::FutureResult`, found struct `actix::prelude::Request`
    |
    = note: expected type `actix::fut::FutureResult<_, SumError, _>`
               found type `actix::prelude::Request<SyncSum, Sum>`
Edited
main.rs 3.75 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment