Skip to content

Commit

Permalink
change names
Browse files Browse the repository at this point in the history
  • Loading branch information
valesteban committed Nov 8, 2023
1 parent b38a483 commit a444577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/resolver/async_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net::IpAddr;
use crate::dns_cache::DnsCache;
use crate::domain_name::DomainName;
use crate::message::DnsMessage;
use crate::resolver::{config::ResolverConfig,lookup::LookupIpFutureStub};
use crate::resolver::{config::ResolverConfig,lookup::LookupFutureStub};
use crate::message::rdata::Rdata;
use crate::client::client_connection::ConnectionProtocol;
use crate::resolver::resolver_error::ResolverError;
Expand Down Expand Up @@ -99,7 +99,7 @@ impl AsyncResolver {
async fn inner_lookup(&self, domain_name: DomainName) -> Result<DnsMessage, ResolverError> {

// Async query
let response = LookupIpFutureStub::lookup(
let response = LookupFutureStub::lookup(
domain_name,
self.config.clone(),
self.cache.clone())
Expand Down
10 changes: 5 additions & 5 deletions src/resolver/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::client::tcp_connection::ClientTCPConnection;
///
/// This implementation of `Future` is used to send a single query to a DNS server.
/// When this future is polled by `AsyncResolver`,
pub struct LookupIpFutureStub {
pub struct LookupFutureStub {
/// Domain Name associated with the query.
name: DomainName,
/// Resolver configuration.
Expand All @@ -39,7 +39,7 @@ pub struct LookupIpFutureStub {
waker: Option<Waker>,
}

impl Future for LookupIpFutureStub {
impl Future for LookupFutureStub {
type Output = Result<DnsMessage, ResolverError>;

fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
Expand Down Expand Up @@ -72,7 +72,7 @@ impl Future for LookupIpFutureStub {
}
}

impl LookupIpFutureStub {
impl LookupFutureStub {

/// Creates a new `LookupIpFutureStub` with the given configuration.
///
Expand Down Expand Up @@ -210,7 +210,7 @@ mod async_resolver_test {
let resource_record = ResourceRecord::new(a_rdata);
cache.add(domain_name_cache, resource_record);

let lookup_future = LookupIpFutureStub::lookup(
let lookup_future = LookupFutureStub::lookup(
domain_name,
config,
cache
Expand Down Expand Up @@ -241,7 +241,7 @@ mod async_resolver_test {
config.set_retry(1);
let cache = DnsCache::new();

let response_future = LookupIpFutureStub::lookup(domain_name, config, cache).await;
let response_future = LookupFutureStub::lookup(domain_name, config, cache).await;
println!("response_future {:?}",response_future);

assert_eq!(response_future.is_ok(), true);
Expand Down

0 comments on commit a444577

Please sign in to comment.