Guest User

Untitled

a guest
Jun 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. error[E0271]: type mismatch resolving `<rpssl::Shape as actix::Message>::Result == std::result::Result<rpssl::GameResult, ()>`
  2. --> src/rpssl.rs:58:6
  3. |
  4. 58 | impl Handler<Shape> for MyActor {
  5. | ^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `std::result::Result`
  6. |
  7. = note: expected type `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
  8. found type `std::result::Result<rpssl::GameResult, ()>`
  9. = 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>`
  10.  
  11. error[E0277]: the trait bound `futures::Future<Error=(), Item=rpssl::GameResult> + 'static: std::marker::Send` is not satisfied
  12. --> src/rpssl.rs:58:6
  13. |
  14. 58 | impl Handler<Shape> for MyActor {
  15. | ^^^^^^^^^^^^^^ `futures::Future<Error=(), Item=rpssl::GameResult> + 'static` cannot be sent between threads safely
  16. |
  17. = help: the trait `std::marker::Send` is not implemented for `futures::Future<Error=(), Item=rpssl::GameResult> + 'static`
  18. = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
  19. = note: required because it appears within the type `std::boxed::Box<futures::Future<Error=(), Item=rpssl::GameResult> + 'static>`
  20. = 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>`
  21.  
  22. error: aborting due to 2 previous errors
  23.  
  24. Some errors occurred: E0271, E0277.
  25. For more information about an error, try `rustc --explain E0271`.
  26. error: Could not compile `rpssl`.
  27.  
  28. To learn more, run the command again with --verbose.
Add Comment
Please, Sign In to add comment