From bc0a3b1582eda9626eb82b353d980dadf652c5f8 Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Wed, 20 Nov 2024 16:28:56 -0800 Subject: [PATCH] Fix warning about Cursor::split() --- pb-jelly/src/extensions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pb-jelly/src/extensions.rs b/pb-jelly/src/extensions.rs index be8f425..9385e75 100644 --- a/pb-jelly/src/extensions.rs +++ b/pb-jelly/src/extensions.rs @@ -144,7 +144,7 @@ impl Extension for RepeatedExtension { let mut msg = U::default(); if wire_format == wire_format::Type::LengthDelimited { let length = varint::read(&mut buf)?.expect("corrupted Unrecognized"); - msg.deserialize(&mut buf.split(length as usize))?; + msg.deserialize(&mut PbBufferReader::split(&mut buf, length as usize))?; } else { // we rely on the fact that the appropriate `Message` impls for i32/Fixed32/etc. only read the prefix of // `buf`. this is a little dirty