|
$ cargo build |
|
Compiling multiplayer v0.0.1 |
|
error[E0271]: type mismatch resolving `<futures::AndThen<std::boxed::Box<futures |
|
::Future<Error=std::io::Error, Item=std::vec::Vec<u8>>>, std::result::Result<(), |
|
std::io::Error>, [closure@src/main.rs:17:44: 20:8 address:_]> as futures::IntoF |
|
uture>::Error == tungstenite::Error` |
|
--> src/main.rs:16:45 |
|
| |
|
16 | tokio_tungstenite::accept_async(stream).and_then(move |_stream| { |
|
| ^^^^^^^^ expected struct `std:: |
|
io::Error`, found enum `tungstenite::Error` |
|
| |
|
= note: expected type `std::io::Error` |
|
found type `tungstenite::Error` |
|
|
|
error[E0599]: no method named `map_err` found for type `futures::AndThen<tokio_t |
|
ungstenite::AcceptAsync<tokio_core::net::TcpStream, tungstenite::handshake::serv |
|
er::NoCallback>, futures::AndThen<std::boxed::Box<futures::Future<Error=std::io: |
|
:Error, Item=std::vec::Vec<u8>>>, std::result::Result<(), std::io::Error>, [clos |
|
ure@src/main.rs:17:44: 20:8 address:_]>, [closure@src/main.rs:16:54: 22:6 handle |
|
_clone:_, address:_]>` in the current scope |
|
--> src/main.rs:23:6 |
|
| |
|
23 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)) |
|
| ^^^^^^^ |
|
| |
|
= note: the method `map_err` exists but the following trait bounds were not s |
|
atisfied: |
|
`futures::AndThen<tokio_tungstenite::AcceptAsync<tokio_core::net::Tcp |
|
Stream, tungstenite::handshake::server::NoCallback>, futures::AndThen<std::boxed |
|
::Box<futures::Future<Error=std::io::Error, Item=std::vec::Vec<u8>>>, std::resul |
|
t::Result<(), std::io::Error>, [closure@src/main.rs:17:44: 20:8 address:_]>, [cl |
|
osure@src/main.rs:16:54: 22:6 handle_clone:_, address:_]> : futures::Future` |
|
`&mut futures::AndThen<tokio_tungstenite::AcceptAsync<tokio_core::net |
|
::TcpStream, tungstenite::handshake::server::NoCallback>, futures::AndThen<std:: |
|
boxed::Box<futures::Future<Error=std::io::Error, Item=std::vec::Vec<u8>>>, std:: |
|
result::Result<(), std::io::Error>, [closure@src/main.rs:17:44: 20:8 address:_]> |
|
, [closure@src/main.rs:16:54: 22:6 handle_clone:_, address:_]> : futures::Stream |
|
` |
|
`&mut futures::AndThen<tokio_tungstenite::AcceptAsync<tokio_core::net |
|
::TcpStream, tungstenite::handshake::server::NoCallback>, futures::AndThen<std:: |
|
boxed::Box<futures::Future<Error=std::io::Error, Item=std::vec::Vec<u8>>>, std:: |
|
result::Result<(), std::io::Error>, [closure@src/main.rs:17:44: 20:8 address:_]> |
|
, [closure@src/main.rs:16:54: 22:6 handle_clone:_, address:_]> : futures::Future |
|
` |
|
|
|
error: aborting due to 2 previous errors |
|
|
|
error: Could not compile `multiplayer`. |
|
|
|
To learn more, run the command again with --verbose. |
coming here from the blog post... why was go ruled out for your use case?