Change self.records.get(0) to self.records.first() in message_request.rs and rr_set.rs

This commit is contained in:
Marcus Butler 2023-12-29 10:47:38 -06:00 committed by Benjamin Fry
parent 497faacc4b
commit a79fd0df8e
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ impl RecordSet {
RecordType::SOA => {
assert!(self.records.len() <= 1);
if let Some(soa_record) = self.records.get(0) {
if let Some(soa_record) = self.records.first() {
match soa_record.data() {
Some(RData::SOA(ref existing_soa)) => {
if let Some(RData::SOA(ref new_soa)) = record.data() {

View File

@ -277,7 +277,7 @@ impl Queries {
length: self.queries.len(),
// We don't generally support more than one query, but this will at least give us one
// cache entry.
first_query: self.queries.get(0),
first_query: self.queries.first(),
cached_serialized: self.original.as_ref(),
}
}