From 798992e965361c24185d3296b99df961353a05e4 Mon Sep 17 00:00:00 2001 From: Kent Ross Date: Sun, 19 Jan 2025 02:25:15 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"[decode=5Flength=5Fdelimiter]=20docum?= =?UTF-8?q?ent=20behavior=20for=20error=20with=2010=20bytes=20b=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5684bd4f6a32bfcd3589b85959093d7d73a7f36c. --- prost/src/encoding/length_delimiter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prost/src/encoding/length_delimiter.rs b/prost/src/encoding/length_delimiter.rs index 6aa7e4cbb..e33313e3b 100644 --- a/prost/src/encoding/length_delimiter.rs +++ b/prost/src/encoding/length_delimiter.rs @@ -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 10 bytes or more, then the buffer contains an invalid +/// * If the supplied buffer contains more than 10 bytes, 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 { let length = decode_varint(&mut buf)?;