diff --git a/crates/client/README.md b/crates/client/README.md index e644ccd8e..b0b43d8d5 100644 --- a/crates/client/README.md +++ b/crates/client/README.md @@ -27,7 +27,7 @@ use std::str::FromStr; use hickory_client::client::{Client, SyncClient}; use hickory_client::udp::UdpClientConnection; use hickory_client::op::DnsResponse; -use hickory_client::rr::{DNSClass, Name, RData, Record, RecordType}; +use hickory_client::rr::{rdata::A, DNSClass, Name, RData, Record, RecordType}; let address = "8.8.8.8:53".parse().unwrap(); let conn = UdpClientConnection::new(address).unwrap(); @@ -49,7 +49,7 @@ let answers: &[Record] = response.answers(); // Records are generic objects which can contain any data. // In order to access it we need to first check what type of record it is // In this case we are interested in A, IPv4 address -if let Some(RData::A(ref ip)) = answers[0].data() { +if let Some(RData::A(A(ref ip))) = answers[0].data() { assert_eq!(*ip, Ipv4Addr::new(93, 184, 215, 14)) } else { assert!(false, "unexpected result")