fn follow_cname_1(
    zone: &Zone,
    qname: &Name,
    cname_rrset: &Rrset,
    rr_type: Type,
    response: &mut Writer,
    owners_seen: PreviousOwners,
) -> ProcessingResult<()> {
    if let Some(cname) = cname_rrset
        .rdatas()
        .next()
        .map(|rdata| Name::try_from_uncompressed_all(rdata))
        .and_then(Result::ok)
    {
        if cname.as_ref() == qname || owners_seen.contains(&cname) {
            // The CNAME chain contains a loop.
            Err(ProcessingError::ServFail)
        } else {
            follow_cname_2(zone, qname, cname, rr_type, response, owners_seen)
        }
    } else {
        Err(ProcessingError::ServFail)
    }
}
/// Step 1 of the CNAME-following process. This includes parsing a
/// `Box<Name>` from the CNAME RRset and checking that the CNAME has not
/// already been looked up while processing the current chain.
Step 1 of the CNAME-following process. This includes parsing a
`Box` from the CNAME RRset and checking that the CNAME has not
already been looked up while processing the current chain.
Step 1 of the CNAME - following process . This includes parsing a ` Box ` from the CNAME RRset and checking that the CNAME has not already been looked up while processing the current chain .
fn follow_cname_1(
    zone: &Zone,
    qname: &Name,
    cname_rrset: &Rrset,
    rr_type: Type,
    response: &mut Writer,
    owners_seen: PreviousOwners,
) -> ProcessingResult<()> {
    if let Some(cname) = cname_rrset
        .rdatas()
        .next()
        .map(|rdata| Name::try_from_uncompressed_all(rdata))
        .and_then(Result::ok)
    {
        if cname.as_ref() == qname || owners_seen.contains(&cname) {
            // The CNAME chain contains a loop.
            Err(ProcessingError::ServFail)
        } else {
            follow_cname_2(zone, qname, cname, rr_type, response, owners_seen)
        }
    } else {
        Err(ProcessingError::ServFail)
    }
}
fn follow_cname_1 ( zone : & Zone , qname : & Name , cname_rrset : & Rrset , rr_type : Type , response : & mut Writer , owners_seen : PreviousOwners , ) -> ProcessingResult < ( ) > { if let Some ( cname ) = cname_rrset . rdatas ( ) . next ( ) . map ( | rdata | Name :: try_from_uncompressed_all ( rdata ) ) . and_then ( Result :: ok ) { if cname . as_ref ( ) == qname || owners_seen . contains ( & cname ) { // The CNAME chain contains a loop. Err ( ProcessingError :: ServFail ) } else { follow_cname_2 ( zone , qname , cname , rr_type , response , owners_seen ) } } else { Err ( ProcessingError :: ServFail ) } }
Step 1 of the CNAME-following process.
Step 1 of the CNAME - following process .
zone
&Zone
qname
&Name
cname_rrset
&Rrset
rr_type
Type
response
&mut Writer
owners_seen
PreviousOwners
zone
&Zone
qname
&Name
cname_rrset
&Rrset
rr_type
Type
response
&mut Writer
owners_seen
PreviousOwners