Function diem_types::nibble::nibble_path::skip_common_prefix
source · pub fn skip_common_prefix<I1, I2>(x: &mut I1, y: &mut I2) -> usizewhere
I1: Iterator + Peekable,
I2: Iterator + Peekable,
<I1 as Iterator>::Item: PartialEq<<I2 as Iterator>::Item>,
Expand description
Advance both iterators if their next nibbles are the same until either reaches the end or the find a mismatch. Return the number of matched nibbles.