Skip to content

Commit

Permalink
Change self.records.get(0) to self.records.first() in message_request…
Browse files Browse the repository at this point in the history
….rs and rr_set.rs
  • Loading branch information
marcus0x62 committed Dec 30, 2023
1 parent 497faac commit 3b31a04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/proto/src/rr/rr_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/authority/message_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
Expand Down

0 comments on commit 3b31a04

Please sign in to comment.