Apply clippy suggestions from Rust 1.77

This commit is contained in:
Dirkjan Ochtman 2024-03-22 10:27:43 +01:00 committed by Benjamin Fry
parent 9e8f8c67fb
commit 4ebc33f2f1
2 changed files with 5 additions and 5 deletions

View File

@ -744,7 +744,7 @@ mod tests {
#[allow(deprecated)]
#[allow(clippy::unreadable_literal)]
fn test_calculate_key_tag() {
let test_vectors = vec![
let test_vectors = [
(vec![33, 3, 21, 11, 3, 1, 1, 1], 9739),
(
vec![

View File

@ -401,7 +401,7 @@ mod tests {
Record::from_rdata(name.clone(), 1, RData::A(A::new(127, 0, 0, 1))),
1,
)];
let ips = vec![RData::A(A::new(127, 0, 0, 1))];
let ips = [RData::A(A::new(127, 0, 0, 1))];
// configure the cache with a minimum TTL of 2 seconds.
let ttls = TtlConfig {
@ -491,7 +491,7 @@ mod tests {
Record::from_rdata(name.clone(), 62, RData::A(A::new(127, 0, 0, 1))),
62,
)];
let ips = vec![RData::A(A::new(127, 0, 0, 1))];
let ips = [RData::A(A::new(127, 0, 0, 1))];
// configure the cache with a maximum TTL of 60 seconds.
let ttls = TtlConfig {
@ -580,7 +580,7 @@ mod tests {
Record::from_rdata(name, 1, RData::A(A::new(127, 0, 0, 1))),
1,
)];
let ips = vec![RData::A(A::new(127, 0, 0, 1))];
let ips = [RData::A(A::new(127, 0, 0, 1))];
let lru = DnsLru::new(1, TtlConfig::default());
let rc_ips = lru.insert(query.clone(), ips_ttl, now);
@ -600,7 +600,7 @@ mod tests {
Record::from_rdata(name, 10, RData::A(A::new(127, 0, 0, 1))),
10,
)];
let ips = vec![RData::A(A::new(127, 0, 0, 1))];
let ips = [RData::A(A::new(127, 0, 0, 1))];
let lru = DnsLru::new(1, TtlConfig::default());
let rc_ips = lru.insert(query.clone(), ips_ttl, now);