Skip to content

Fix decoder example to avoid panicking on malformed input #173

@coderabbitai

Description

@coderabbitai

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions