Closed f8122dac closed 4 years ago
The playground on the book's web interface seems to through error as well, looks like actix is not found:
Compiling playground v0.0.1 (/playground)
error[E0463]: can't find crate for `actix`
--> src/main.rs:1:1
|
1 | extern crate actix;
| ^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Could you check if your deps are the same as here?:
https://github.com/actix/book/blob/2d6a0c1274330e690c2e0e54a936454376f9641f/Cargo.toml#L21-L41
Thank you @JohnTitor. My Cargo.toml
had actix = "0.9.0"
and future = "0.3.4"
.
And the versions suggested by the Cargo.toml file you pointed out did compile.
I'm curious why this fails to compile in newer versions? Should I use this combination of actix and futures versions instead of newer versions to use map and map_err?
Because there is no compatibility between futures 0.1 and 0.3 (i.e. actix 0.7 and 0.9). Indeed we should update this book to the latest but I don't have bandwidth right now. You can see docs.rs or examples on actix repo when using actix 0.9. I'm going to close this issue as the current doc is correct.
The example in arbiter chapter does not compile.
I'm compiling on rust nightly
rustc 1.43.0-nightly (8aa9d2014 2020-02-21)
Tried adding suggested use statements, but no luck.