We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a650a2 commit 9a88709Copy full SHA for 9a88709
part2/src/telnet.rs
@@ -56,7 +56,11 @@ impl Decoder for Telnet {
56
while let Some(n) = src.iter().position(|&b| b == ESCAPE) {
57
let next = match src.get(n + 1).map(|&x| TelnetCommand::try_from(x).ok()) {
58
Some(Some(b)) => b,
59
- Some(None) => continue,
+ Some(None) => {
60
+ buf.extend_from_slice(&src[..n]);
61
+ src.advance(n + 2);
62
+ continue;
63
+ },
64
None => return Ok(None)
65
};
66
match next {
0 commit comments