fn match_trace(actual: &Vec<MuID>, expected: &Vec<MuID>) -> bool {
    assert!(actual.len() >= expected.len());

    debug!("matching trace:");
    debug!("actual: {:?}", actual);
    debug!("expected: {:?}", expected);

    let mut expected_cursor = 0;

    for i in actual {
        if *i == expected[expected_cursor] {
            expected_cursor += 1;

            if expected_cursor == expected.len() {
                return true;
            }
        }
    }

    return false;
}
// as long as expected appears in correct order in actual, it is correct
as long as expected appears in correct order in actual, it is correct
as long as expected appears in correct order in actual it is correct
fn match_trace(actual: &Vec<MuID>, expected: &Vec<MuID>) -> bool {
    assert!(actual.len() >= expected.len());
    debug!("matching trace:");
    debug!("actual: {:?}", actual);
    debug!("expected: {:?}", expected);
    let mut expected_cursor = 0;
    for i in actual {
        if *i == expected[expected_cursor] {
            expected_cursor += 1;
            if expected_cursor == expected.len() {
                return true;
            }
        }
    }
    return false;
}
fn match_trace ( actual : & Vec < MuID > , expected : & Vec < MuID > ) -> bool { assert ! ( actual len ( ) expected len ( ) ) ; debug ! ( " " ) ; debug ! ( " " actual ) ; debug ! ( " " expected ) ; let mut expected_cursor = 0 ; for i in actual { if * i == expected [ expected_cursor ] { expected_cursor += 1 ; if expected_cursor == expected . len ( ) { return true ; } } } return false ; }
as long as expected appears in correct order in actual, it is correct
as long as expected appears in correct order in actual it is correct
actual
&Vec<MuID>
expected
&Vec<MuID>
actual
&Vec<MuID>
expected
&Vec<MuID>