INNER CODE UNIT · Rust
len
TheMaxMur/RS-Key · crates/rsk-devconf/src/lib.rs:393
let len = stored[i + 1] as usize;
let end = i + 2 + len;
if end > stored.len() {
break;
}
if !has_tag(incoming, stored[i]) {
push(&stored[i..end], out)?;
}
i = end;
}
push(incoming, out)?;
Ok(n)
}
/// Whether a well-formed TLV run carries an entry with `tag`.
fn has_tag(blob: &[u8], tag: u8) -> bool {
let mut i = 0;
while i + 1 < blob.len() {