Skip to content

Commit

Permalink
[decode_length_delimiter] document behavior for error with 10 bytes b…
Browse files Browse the repository at this point in the history
…uffer (#1208)
  • Loading branch information
NilsIrl authored Jan 8, 2025
1 parent d2445e1 commit 5684bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prost/src/encoding/length_delimiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn length_delimiter_len(length: usize) -> usize {
///
/// * If the supplied buffer contains fewer than 10 bytes, then an error indicates that more
/// input is required to decode the full delimiter.
/// * If the supplied buffer contains more than 10 bytes, then the buffer contains an invalid
/// * If the supplied buffer contains 10 bytes or more, then the buffer contains an invalid
/// delimiter, and typically the buffer should be considered corrupt.
pub fn decode_length_delimiter(mut buf: impl Buf) -> Result<usize, DecodeError> {
let length = decode_varint(&mut buf)?;
Expand Down

0 comments on commit 5684bd4

Please sign in to comment.