-
I'm trying to upgrade to tokio 0.3 At first I ran into the same issue as #2984 because I hadn't upgraded tokio-util at the same time, but I think that's different now I've also updated it. I get errors like the following:
But the doc hasn't changed on this point so I'm not sure what to do. From what I understand tokio's TcpStream implements tokio's AsyncRead/Write and not futures' so maybe a mix between the two? I now see there also is another split in tokio with ReadHalf/WriteHalf which have tokio's AsyncRead/Write and might be more approprite but I can't fiddle things properly to get this right. You can try on https://github.com/martinetd/matrirc/tree/tokio-0.3 (previous commit works with tokio 0.2/tokio-util 0.3) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Rust couldn't decide which split you wanted, so I changed the line to the following to disambiguate it: let (mut writer, reader) = futures::StreamExt::split(stream); this gives me:
So it appears that the struct MyIrcCodec {
inner: IrcCodec,
} then implement the new |
Beta Was this translation helpful? Give feedback.
-
Right, the irc crate is still using
I'll try to get the dep updated instead, although doing that would probably be good for the sake of learning how... Thanks! |
Beta Was this translation helpful? Give feedback.
Rust couldn't decide which split you wanted, so I changed the line to the following to disambiguate it:
this gives me: