pub(super) fn soas_equal(first: &Rdata, second: &Rdata) -> bool {
    assert!(first.len() == second.len());
    match helpers::test_n_name_fields(first, second, 2) {
        Some(Some(len)) => {
            if first.len() - len != 20 {
                // The remaining fields are not the right length.
                // Fall back to bitwise comparison.
                first == second
            } else {
                // Compare the remaining fields bitwise.
                first[len..] == second[len..]
            }
        }
        Some(None) => false,
        None => first == second,
    }
}
/// Tests two on-the-wire SOA records *with the same length* for
/// equality, falling back to bitwise comparison if either is invalid.
/// This is for the implementation of [`Rdata::equals`].
Tests two on-the-wire SOA records *with the same length* for
equality, falling back to bitwise comparison if either is invalid.
This is for the implementation of [`Rdata::equals`].
Tests two on - the - wire SOA records * with the same length * for equality falling back to bitwise comparison if either is invalid . This is for the implementation of [ ` Rdata :: equals ` ] .
pub(super) fn soas_equal(first: &Rdata, second: &Rdata) -> bool {
    assert!(first.len() == second.len());
    match helpers::test_n_name_fields(first, second, 2) {
        Some(Some(len)) => {
            if first.len() - len != 20 {
                // The remaining fields are not the right length.
                // Fall back to bitwise comparison.
                first == second
            } else {
                // Compare the remaining fields bitwise.
                first[len..] == second[len..]
            }
        }
        Some(None) => false,
        None => first == second,
    }
}
pub ( super ) fn soas_equal ( first : & Rdata , second : & Rdata ) -> bool { assert ! ( first len ( ) second len ( ) ) ; match helpers :: test_n_name_fields ( first , second , 2 ) { Some ( Some ( len ) ) => { if first . len ( ) - len != 20 { // The remaining fields are not the right length. // Fall back to bitwise comparison. first == second } else { // Compare the remaining fields bitwise. first [ len .. ] == second [ len .. ] } } Some ( None ) => false , None => first == second , } }
Tests two on-the-wire SOA records *with the same length* for
equality, falling back to bitwise comparison if either is invalid.
Tests two on - the - wire SOA records * with the same length * for equality falling back to bitwise comparison if either is invalid .
first
&Rdata
second
&Rdata
first
&Rdata
second
&Rdata