rust-chat icon indicating copy to clipboard operation
rust-chat copied to clipboard

try to run the repo after git clone

Open geyang opened this issue 9 years ago • 3 comments

I'm on the part-2 branch

after compiling, I got the following error:

/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:137:21: 137:30 error: no method named `try_write` found for type `mio::tcp::TcpStream` in the current scope
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:137         self.socket.try_write(response.as_bytes()).unwrap();
                                                                                                           ^~~~~~~~~
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:185:31: 185:44 error: no method named `try_write_buf` found for type `mio::tcp::TcpStream` in the current scope
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:185             match self.socket.try_write_buf(&mut self.outgoing_bytes) {
                                                                                                                     ^~~~~~~~~~~~~
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:225:27: 225:39 error: no method named `try_read_buf` found for type `mio::tcp::TcpStream` in the current scope
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:225         match self.socket.try_read_buf(&mut buf) {
                                                                                                                 ^~~~~~~~~~~~
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:239:31: 239:43 error: no method named `try_read_buf` found for type `mio::tcp::TcpStream` in the current scope
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:239             match self.socket.try_read_buf(&mut buf) {
                                                                                                                     ^~~~~~~~~~~~
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:346:31: 346:39 error: no method named `try_read` found for type `mio::tcp::TcpStream` in the current scope
/Users/ge/.cargo/git/checkouts/mio-websocket-c3024760b4501cdb/master/src/client.rs:346             match self.socket.try_read(&mut buf) {
                                                                                                                     ^~~~~~~~
error: aborting due to 5 previous errors
Build failed, waiting for other jobs to finish...
error: Could not compile `mio-websocket`.

To learn more, run the command again with --verbose.

I'm new to rust so this is completely over my head.

Thanks for the help in advance!

geyang avatar Aug 07 '16 18:08 geyang

@episodeyang this repo pins to the master branch on mio. Try removing the existing mio dependency and replace it with mio = "0.5.0" in Cargo.toml file.

hjr3 avatar Sep 15 '16 03:09 hjr3

Sorry, this repo has been on hold for a while. Please use the master branch for now, I've updated it and it should build correctly (you might need to run cargo update first). Soon it's going to be updated to the latest version of mio too. Thanks for the report!

nbaksalyar avatar Sep 15 '16 05:09 nbaksalyar

Thanks! Will try this later tonight.

Ge

On Wednesday, September 14, 2016, Nikita Baksalyar [email protected] wrote:

Sorry, this repo has been on hold for a while. Please use the master branch for now, I've updated it and it should build correctly (you might need to run cargo update first). Soon it's going to be updated to the latest version of mio too. Thanks for the report!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nbaksalyar/rust-chat/issues/8#issuecomment-247241782, or mute the thread https://github.com/notifications/unsubscribe-auth/AAme2kGOc1f6Y5rHPHtQR0QvkT5WeZiKks5qqN2dgaJpZM4JejnX .

geyang avatar Sep 15 '16 20:09 geyang