Skip to content

Commit 5966ae4

Browse files
authored
[decode_length_delimiter] document behavior for error with 10 bytes buffer
1 parent 56b9602 commit 5966ae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prost/src/encoding/length_delimiter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn length_delimiter_len(length: usize) -> usize {
4040
///
4141
/// * If the supplied buffer contains fewer than 10 bytes, then an error indicates that more
4242
/// input is required to decode the full delimiter.
43-
/// * If the supplied buffer contains more than 10 bytes, then the buffer contains an invalid
43+
/// * If the supplied buffer contains 10 bytes or more, then the buffer contains an invalid
4444
/// delimiter, and typically the buffer should be considered corrupt.
4545
pub fn decode_length_delimiter(mut buf: impl Buf) -> Result<usize, DecodeError> {
4646
let length = decode_varint(&mut buf)?;

0 commit comments

Comments
 (0)