pub(super) fn srvs_equal(first: &Rdata, second: &Rdata) -> bool {
    assert!(first.len() == second.len());
    if first.len() > 6 {
        // Note that if names_equal falls back to bitwise comparison,
        // then we did a bitwise comparison of the whole thing, so we
        // still did what we said we would!
        first[0..6] == second[0..6] && helpers::names_equal(&first[6..], &second[6..])
    } else {
        // Invalid records; do a bitwise comparison.
        first == second
    }
}
/// Tests two on-the-wire SRV records *with the same length* for
/// equality. If either contains an invalid domain name, then this falls
/// back to bitwise comparison. This is for the implementation of
/// [`Rdata::equals`].
Tests two on-the-wire SRV records *with the same length* for
equality. If either contains an invalid domain name, then this falls
back to bitwise comparison. This is for the implementation of
[`Rdata::equals`].
Tests two on - the - wire SRV records * with the same length * for equality . If either contains an invalid domain name then this falls back to bitwise comparison . This is for the implementation of [ ` Rdata :: equals ` ] .
pub(super) fn srvs_equal(first: &Rdata, second: &Rdata) -> bool {
    assert!(first.len() == second.len());
    if first.len() > 6 {
        // Note that if names_equal falls back to bitwise comparison,
        // then we did a bitwise comparison of the whole thing, so we
        // still did what we said we would!
        first[0..6] == second[0..6] && helpers::names_equal(&first[6..], &second[6..])
    } else {
        // Invalid records; do a bitwise comparison.
        first == second
    }
}
pub ( super ) fn srvs_equal ( first : & Rdata , second : & Rdata ) -> bool { assert ! ( first len ( ) second len ( ) ) ; if first . len ( ) > 6 { // Note that if names_equal falls back to bitwise comparison, // then we did a bitwise comparison of the whole thing, so we // still did what we said we would! first [ 0 .. 6 ] == second [ 0 .. 6 ] && helpers :: names_equal ( & first [ 6 .. ] , & second [ 6 .. ] ) } else { // Invalid records; do a bitwise comparison. first == second } }
Tests two on-the-wire SRV records *with the same length* for
equality.
Tests two on - the - wire SRV records * with the same length * for equality .
first
&Rdata
second
&Rdata
first
&Rdata
second
&Rdata