Skip to content

Commit

Permalink
appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed May 7, 2024
1 parent c92fe47 commit 84c58f6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions crates/recursor/src/recursor.rs
Expand Up @@ -331,15 +331,12 @@ impl Recursor {
// TODO: validation must be performed if the CD (Checking Disabled) is not set
let mut answers = r.take_answers();
if !query_has_dnssec_ok {
answers = answers
.into_iter()
.filter(|rrset| {
// RFC 4035 section 3.2.1 if DO bit not set, strip DNSSEC records
// unless explicitly requested
let record_type = rrset.record_type();
record_type == query.query_type() || !record_type.is_dnssec()
})
.collect();
answers.retain(|rrset| {
// RFC 4035 section 3.2.1 if DO bit not set, strip DNSSEC records
// unless explicitly requested
let record_type = rrset.record_type();
record_type == query.query_type() || !record_type.is_dnssec()
});
}

Ok(Lookup::new_with_max_ttl(query, Arc::from(answers)))
Expand Down

0 comments on commit 84c58f6

Please sign in to comment.