DEV Community

[Comment from a deleted post]
Collapse
 
nmrshll profile image
Nicolas Marshall

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>> ?