paritytech / unsigned-varint

MIT License
20 stars 22 forks source link

bump tokio-util version to 0.7 #64

Closed crusader-mike closed 1 year ago

crusader-mike commented 2 years ago

Current version of tokio-util is 0.7.4, but unsigned-varint uses 0.6.10. This causes an issue:

error[E0599]: no method named `decode` found for struct `Uvi` in the current scope
   --> <myproject>\src\message_codec.rs:33:49
    |
33  |             self.frame_size = self.varint_codec.decode(src)?;
    |                                                 ^^^^^^ this is an associated function, not a method
    |
   ::: C:\Users\crusader\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-util-0.6.10\src\codec\decoder.rs:124:8
    |
124 |     fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error>;
    |        ------ the method is available for `Uvi<usize>` here
    |

it looks like Decoder from v0.6 is not the same as Decoder from 0.7...

I suspect correct way to address this is to bump tokio-util version to 0.7 (in this crate's Cargo.toml)?

altonen commented 1 year ago

Done: https://github.com/paritytech/unsigned-varint/pull/59