Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0271]: type mismatch resolving `<rpssl::Shape as actix::Message>::Result == std::result::Result<rpssl::GameResult, ()>`
- --> src/rpssl.rs:58:6
- |
- 58 | impl Handler<Shape> for MyActor {
- | ^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `std::result::Result`
- |
- = note: expected type `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
- found type `std::result::Result<rpssl::GameResult, ()>`
- = note: required because of the requirements on the impl of `actix::dev::MessageResponse<rpssl::MyActor, rpssl::Shape>` for `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
- error[E0277]: the trait bound `futures::Future<Error=(), Item=rpssl::GameResult> + 'static: std::marker::Send` is not satisfied
- --> src/rpssl.rs:58:6
- |
- 58 | impl Handler<Shape> for MyActor {
- | ^^^^^^^^^^^^^^ `futures::Future<Error=(), Item=rpssl::GameResult> + 'static` cannot be sent between threads safely
- |
- = help: the trait `std::marker::Send` is not implemented for `futures::Future<Error=(), Item=rpssl::GameResult> + 'static`
- = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
- = note: required because it appears within the type `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
- = note: required because of the requirements on the impl of `actix::dev::MessageResponse<rpssl::MyActor, rpssl::Shape>` for `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
- error: aborting due to 2 previous errors
- Some errors occurred: E0271, E0277.
- For more information about an error, try `rustc --explain E0271`.
- error: Could not compile `rpssl`.
- To learn more, run the command again with --verbose.
Add Comment
Please, Sign In to add comment