The decoder example in the design documentation uses .expect() when reading the length prefix, which can cause the entire task to panic on malformed or truncated input.
The example should demonstrate proper error handling by propagating the io::Error instead of panicking.
Location: docs/rust-binary-router-library-design.md around lines 1139-1145
Context:
The documentation should serve as a good example of robust error handling practices rather than demonstrating brittle code that could fail unexpectedly.
The decoder example in the design documentation uses
.expect()when reading the length prefix, which can cause the entire task to panic on malformed or truncated input.The example should demonstrate proper error handling by propagating the
io::Errorinstead of panicking.Location:
docs/rust-binary-router-library-design.mdaround lines 1139-1145Context:
The documentation should serve as a good example of robust error handling practices rather than demonstrating brittle code that could fail unexpectedly.