Rust: drain the header peek so rmp-serde accepts the array
The peek left snapshot slots unread and rmp-serde refused the length mismatch, so every store fell through to the legacy decode. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
95f04c1efb
commit
36aa8d8791
1 changed files with 1 additions and 0 deletions
|
|
@ -330,6 +330,7 @@ fn store_header(bytes: &[u8]) -> Option<String> {
|
|||
let header: String = seq
|
||||
.next_element()?
|
||||
.ok_or_else(|| <A::Error as serde::de::Error>::invalid_length(0, &self))?;
|
||||
while seq.next_element::<serde::de::IgnoredAny>()?.is_some() {}
|
||||
Ok(Header(header))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue