Skip to content

Commit

Permalink
Fix warning about Cursor::split()
Browse files Browse the repository at this point in the history
  • Loading branch information
goffrie committed Nov 21, 2024
1 parent 8281e6b commit bc0a3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pb-jelly/src/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<T: Extensible, U: Message> Extension for RepeatedExtension<T, U> {
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
Expand Down

0 comments on commit bc0a3b1

Please sign in to comment.