Nice write-up, definitely helping me get started with Tokio codecs.
Just one thing: in your consume() function (for testing), you're returning a Vec<Result<Option<TelnetEvent>, TelnetError>>, but since you're handling the Ok(None) case and never returning from there, you'll never end up with a None in the Option<> in the return value.
So if i'm not mistaken this function can be simplified to return a Vec<Result<TelnetEvent,TelnetError>> ?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice write-up, definitely helping me get started with Tokio codecs.
Just one thing: in your consume() function (for testing), you're returning a
Vec<Result<Option<TelnetEvent>, TelnetError>>
, but since you're handling theOk(None)
case and never returning from there, you'll never end up with a None in theOption<>
in the return value.So if i'm not mistaken this function can be simplified to return a
Vec<Result<TelnetEvent,TelnetError>>
?