Some tests involving futures-rs
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

26 lines
1.1KB

  1. Compiling futuretest v0.1.0 (file:///mnt/c/Users/Mahmoud/git/futuretest)
  2. error[E0271]: type mismatch resolving `<futures::FutureResult<(), std::string::String> as futures::IntoFuture>::Error == &str`
  3. --> src/main.rs:12:10
  4. |
  5. 12 | .and_then(|_|
  6. | ^^^^^^^^ expected struct `std::string::String`, found &str
  7. |
  8. = note: expected type `std::string::String`
  9. found type `&str`
  10. error[E0271]: type mismatch resolving `<futures::FutureResult<(), std::string::String> as futures::IntoFuture>::Error == &str`
  11. --> src/main.rs:19:10
  12. |
  13. 19 | core.run(f).unwrap();
  14. | ^^^ expected struct `std::string::String`, found &str
  15. |
  16. = note: expected type `std::string::String`
  17. found type `&str`
  18. = note: required because of the requirements on the impl of `futures::Future` for `futures::AndThen<futures::MapErr<futures::FutureResult<(), ()>, [closure@src/main.rs:11:18: 11:43]>, futures::FutureResult<(), std::string::String>, [closure@src/main.rs:12:19: 15:14]>`
  19. error: aborting due to 2 previous errors
  20. error: Could not compile `futuretest`.
  21. To learn more, run the command again with --verbose.