fn syntax_matches<'a>(actual: &'a Syntax<'a>, expected: &'a Syntax<'a>) -> bool {
        match (actual, expected) {
            (
                List {
                    change: lhs_change,
                    open_position: lhs_open_position,
                    open_content: lhs_start_content,
                    children: lhs_children,
                    close_content: lhs_end_content,
                    close_position: lhs_close_position,
                    num_descendants: lhs_num_descendants,
                    ..
                },
                List {
                    change: rhs_change,
                    open_position: rhs_open_position,
                    open_content: rhs_start_content,
                    children: rhs_children,
                    close_content: rhs_end_content,
                    close_position: rhs_close_position,
                    num_descendants: rhs_num_descendants,
                    ..
                },
            ) => {
                if lhs_change != rhs_change {
                    dbg!(lhs_change.get(), rhs_change.get());
                    return false;
                }
                if lhs_open_position != rhs_open_position {
                    dbg!(lhs_open_position, rhs_open_position);
                    return false;
                }

                if lhs_start_content != rhs_start_content {
                    dbg!(lhs_start_content, rhs_start_content);
                    return false;
                }
                if lhs_end_content != rhs_end_content {
                    dbg!(lhs_end_content, rhs_end_content);
                    return false;
                }
                if lhs_close_position != rhs_close_position {
                    dbg!(lhs_close_position, rhs_close_position);
                    return false;
                }

                if lhs_num_descendants != rhs_num_descendants {
                    dbg!(lhs_num_descendants, rhs_num_descendants);
                    return false;
                }

                if !syntaxes_match(lhs_children, rhs_children) {
                    return false;
                }
            }
            (
                Atom {
                    change: lhs_change,
                    position: lhs_position,
                    content: lhs_content,
                    kind: lhs_kind,
                    ..
                },
                Atom {
                    change: rhs_change,
                    position: rhs_position,
                    content: rhs_content,
                    kind: rhs_kind,
                    ..
                },
            ) => {
                if lhs_change != rhs_change {
                    dbg!(lhs_change.get(), rhs_change.get());
                    return false;
                }
                if lhs_position != rhs_position {
                    dbg!(lhs_position, rhs_position);
                    return false;
                }

                if lhs_content != rhs_content {
                    dbg!(lhs_content, rhs_content);
                    return false;
                }
                if lhs_kind != rhs_kind {
                    dbg!(lhs_kind, rhs_kind);
                    return false;
                }
            }
            _ => {
                return false;
            }
        }
        true
    }
/// Compare all the fields in a Syntax value, not just
/// those used in its Eq implementation.
Compare all the fields in a Syntax value, not just
those used in its Eq implementation.
Compare all the fields in a Syntax value not just those used in its Eq implementation .
fn syntax_matches<'a>(actual: &'a Syntax<'a>, expected: &'a Syntax<'a>) -> bool {
        match (actual, expected) {
            (
                List {
                    change: lhs_change,
                    open_position: lhs_open_position,
                    open_content: lhs_start_content,
                    children: lhs_children,
                    close_content: lhs_end_content,
                    close_position: lhs_close_position,
                    num_descendants: lhs_num_descendants,
                    ..
                },
                List {
                    change: rhs_change,
                    open_position: rhs_open_position,
                    open_content: rhs_start_content,
                    children: rhs_children,
                    close_content: rhs_end_content,
                    close_position: rhs_close_position,
                    num_descendants: rhs_num_descendants,
                    ..
                },
            ) => {
                if lhs_change != rhs_change {
                    dbg!(lhs_change.get(), rhs_change.get());
                    return false;
                }
                if lhs_open_position != rhs_open_position {
                    dbg!(lhs_open_position, rhs_open_position);
                    return false;
                }
                if lhs_start_content != rhs_start_content {
                    dbg!(lhs_start_content, rhs_start_content);
                    return false;
                }
                if lhs_end_content != rhs_end_content {
                    dbg!(lhs_end_content, rhs_end_content);
                    return false;
                }
                if lhs_close_position != rhs_close_position {
                    dbg!(lhs_close_position, rhs_close_position);
                    return false;
                }
                if lhs_num_descendants != rhs_num_descendants {
                    dbg!(lhs_num_descendants, rhs_num_descendants);
                    return false;
                }
                if !syntaxes_match(lhs_children, rhs_children) {
                    return false;
                }
            }
            (
                Atom {
                    change: lhs_change,
                    position: lhs_position,
                    content: lhs_content,
                    kind: lhs_kind,
                    ..
                },
                Atom {
                    change: rhs_change,
                    position: rhs_position,
                    content: rhs_content,
                    kind: rhs_kind,
                    ..
                },
            ) => {
                if lhs_change != rhs_change {
                    dbg!(lhs_change.get(), rhs_change.get());
                    return false;
                }
                if lhs_position != rhs_position {
                    dbg!(lhs_position, rhs_position);
                    return false;
                }
                if lhs_content != rhs_content {
                    dbg!(lhs_content, rhs_content);
                    return false;
                }
                if lhs_kind != rhs_kind {
                    dbg!(lhs_kind, rhs_kind);
                    return false;
                }
            }
            _ => {
                return false;
            }
        }
        true
    }
fn syntax_matches < ' a > ( actual : & ' a Syntax < ' a > , expected : & ' a Syntax < ' a > ) -> bool { match ( actual , expected ) { ( List { change : lhs_change , open_position : lhs_open_position , open_content : lhs_start_content , children : lhs_children , close_content : lhs_end_content , close_position : lhs_close_position , num_descendants : lhs_num_descendants , .. } , List { change : rhs_change , open_position : rhs_open_position , open_content : rhs_start_content , children : rhs_children , close_content : rhs_end_content , close_position : rhs_close_position , num_descendants : rhs_num_descendants , .. } , ) => { if lhs_change != rhs_change { dbg ! ( lhs_change get ( ) rhs_change get ( ) ) ; return false ; } if lhs_open_position != rhs_open_position { dbg ! ( lhs_open_position rhs_open_position ) ; return false ; } if lhs_start_content != rhs_start_content { dbg ! ( lhs_start_content rhs_start_content ) ; return false ; } if lhs_end_content != rhs_end_content { dbg ! ( lhs_end_content rhs_end_content ) ; return false ; } if lhs_close_position != rhs_close_position { dbg ! ( lhs_close_position rhs_close_position ) ; return false ; } if lhs_num_descendants != rhs_num_descendants { dbg ! ( lhs_num_descendants rhs_num_descendants ) ; return false ; } if ! syntaxes_match ( lhs_children , rhs_children ) { return false ; } } ( Atom { change : lhs_change , position : lhs_position , content : lhs_content , kind : lhs_kind , .. } , Atom { change : rhs_change , position : rhs_position , content : rhs_content , kind : rhs_kind , .. } , ) => { if lhs_change != rhs_change { dbg ! ( lhs_change get ( ) rhs_change get ( ) ) ; return false ; } if lhs_position != rhs_position { dbg ! ( lhs_position rhs_position ) ; return false ; } if lhs_content != rhs_content { dbg ! ( lhs_content rhs_content ) ; return false ; } if lhs_kind != rhs_kind { dbg ! ( lhs_kind rhs_kind ) ; return false ; } } _ => { return false ; } } true }
Compare all the fields in a Syntax value, not just
those used in its Eq implementation.
Compare all the fields in a Syntax value not just those used in its Eq implementation .
actual
&'a Syntax<'a>
expected
&'a Syntax<'a>