Separate I/O from Telnet Parsing & Formatting#17
Separate I/O from Telnet Parsing & Formatting#17JamesStewy wants to merge 3 commits intoSLMT:masterfrom
Conversation
|
Following on from the discussion in the issue:
I also couldn't find any examples of this being done in other libraries and agree that the One issue I have with the current proposal is that data is copied into a box as a part of formatting (escaping) it. It is possible and would be faster if data formatting was done entirely through slices. One way this could be done is changing let data = [1, 2, 0xFF, 3, 4];
let buffer = telnet::format::data(&data);
for b in buffer.into_iter() {
stream.write_all(b)?;
}Thoughts? |
|
Sure, I agree with you. We should use slicing instead of copying for the data. Your proposal for |
|
I have made the return type for |
|
Any updates? |
Following on from #15, this PR separates I/O from the parsing and formatting of Telnet data to allow alternate I/O models such as async/await.
TODO: