diff --git a/crates/proto/src/rr/rdata/soa.rs b/crates/proto/src/rr/rdata/soa.rs index 7447c2ff..360088b7 100644 --- a/crates/proto/src/rr/rdata/soa.rs +++ b/crates/proto/src/rr/rdata/soa.rs @@ -229,10 +229,10 @@ impl RecordData for SOA { decoder: &mut BinDecoder<'_>, record_type: RecordType, _length: Restrict, - ) -> ProtoResult { + ) -> ProtoResult { assert_eq!(RecordType::SOA, record_type); - Ok(SOA { + Ok(Self { mname: Name::read(decoder)?, rname: Name::read(decoder)?, serial: decoder.read_u32()?.unverified(/*any u32 is valid*/), diff --git a/crates/proto/src/rr/resource.rs b/crates/proto/src/rr/resource.rs index bebb74b3..4663a7bb 100644 --- a/crates/proto/src/rr/resource.rs +++ b/crates/proto/src/rr/resource.rs @@ -197,7 +197,7 @@ impl Record { /// Converts this Record into a generic version of RData pub fn into_record_of_rdata(self) -> Record { - let Record { + let Self { name_labels, rr_type, dns_class, @@ -277,13 +277,7 @@ impl Record { /// For example, the if the TYPE is A and the CLASS is IN, /// the RDATA field is a 4 octet ARPA Internet address. /// ``` - #[allow(deprecated)] pub fn set_data(&mut self, rdata: Option) -> &mut Self { - // debug_assert!( - // !(matches!(&rdata, Some(RData::ZERO)) - // && matches!(&rdata, Some(RData::NULL(null)) if null.anything().is_empty())), - // "pass None rather than ZERO or NULL" - // ); self.rdata = rdata; self }