cranelift_codegen_meta::unique_table

Function find_subsequence

source
fn find_subsequence<T: PartialEq>(sub: &[T], whole: &[T]) -> Option<usize>
Expand description

Try to find the subsequence sub in the whole sequence. Returns None if it’s not been found, or Some(index) if it has been. Naive implementation until proven we need something better.