Skip to content

Commit

Permalink
fix cleanliness for 1.76
Browse files Browse the repository at this point in the history
  • Loading branch information
bluejekyll authored and djc committed Apr 16, 2024
1 parent b6b9f22 commit f055845
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/proto/src/rr/rr_set.rs
Expand Up @@ -866,7 +866,7 @@ mod test {

#[test]
#[cfg(feature = "dnssec")] // This tests RFC 6975, a DNSSEC-specific feature.
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
fn test_get_filter() {
use crate::rr::dnssec::rdata::DNSSECRData;
use crate::rr::dnssec::rdata::RRSIG;
Expand Down
4 changes: 2 additions & 2 deletions crates/proto/src/xfer/dnssec_dns_handle.rs
Expand Up @@ -639,7 +639,7 @@ fn test_preserve() {
/// Invalid RRSIGs will be ignored. RRSIGs will only be validated against DNSKEYs which can
/// be validated through a chain back to the `trust_anchor`. As long as one RRSIG is valid,
/// then the RRSET will be valid.
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
async fn verify_default_rrset<H, E>(
handle: &DnssecDnsHandle<H>,
rrset: Rrset,
Expand Down Expand Up @@ -860,7 +860,7 @@ fn verify_rrset_with_dnskey(_: &DNSKEY, _: &RRSIG, _: &Rrset) -> ProtoResult<()>
/// corresponding RRSIG RR, a validator MUST ignore the settings of the
/// NSEC and RRSIG bits in an NSEC RR.
/// ```
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
#[doc(hidden)]
pub fn verify_nsec(query: &Query, soa_name: &Name, nsecs: &[&Record]) -> bool {
// TODO: consider converting this to Result, and giving explicit reason for the failure
Expand Down
5 changes: 3 additions & 2 deletions crates/proto/src/xfer/mod.rs
Expand Up @@ -176,10 +176,11 @@ impl DnsHandle for BufDnsRequestStreamHandle {

let (request, oneshot) = OneshotDnsRequest::oneshot(request);
let mut sender = self.sender.clone();
try_oneshot!(sender.try_send(request).map_err(|_| {
let try_send = sender.try_send(request).map_err(|_| {
debug!("unable to enqueue message");
ProtoError::from(ProtoErrorKind::Busy)
}));
});
try_oneshot!(try_send);

DnsResponseReceiver::Receiver(oneshot)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/sqlite/authority.rs
Expand Up @@ -450,7 +450,7 @@ impl SqliteAuthority {
///
#[cfg(feature = "dnssec")]
#[cfg_attr(docsrs, doc(cfg(feature = "dnssec")))]
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn authorize(&self, update_message: &MessageRequest) -> UpdateResult<()> {
use tracing::debug;

Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests/tests/sqlite_authority_tests.rs
Expand Up @@ -1073,7 +1073,7 @@ async fn test_journal() {
}

#[tokio::test]
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
async fn test_recovery() {
// test that this message can be inserted
let conn = Connection::open_in_memory().expect("could not create in memory DB");
Expand Down

0 comments on commit f055845

Please sign in to comment.