Change streams of bytes to be handled by Result<Vec<u8>, std::io::Error>
Cleanup streams
Which issue(s) this PR fixes 🔨
Special notes for reviewers 🗒️
Additional comments 🎤
Previously, most streams would be handled either by just bytes representation or may contain a result using warp Error. While this may not be a problem now, it could be a problem in the future because converting Stream<Item = Result<Vec<u8>, _>> to Stream<Item = Vec<u8>> may cause the stream to fail silently, providing data that may not be complete or corrupted, and using warp error for IO streams may be considered redundant. As a result, byte streams will use Stream<Item = Result<Vec<u8>, std::io::Error>> to make it more idiomatic, supply error handling and reduce redundancy.
What this PR does 📖
Result<Vec<u8>, std::io::Error>
Which issue(s) this PR fixes 🔨
Special notes for reviewers 🗒️
Additional comments 🎤
Error
. While this may not be a problem now, it could be a problem in the future because convertingStream<Item = Result<Vec<u8>, _>>
toStream<Item = Vec<u8>>
may cause the stream to fail silently, providing data that may not be complete or corrupted, and using warp error for IO streams may be considered redundant. As a result, byte streams will useStream<Item = Result<Vec<u8>, std::io::Error>>
to make it more idiomatic, supply error handling and reduce redundancy.