Skip to content

Commit

Permalink
feat: update trust-dns-resolver
Browse files Browse the repository at this point in the history
Change-Id: I311e76bae704d3cc0eeba25d303bd6649dcfae80
  • Loading branch information
fanlv committed Jun 14, 2024
1 parent 8632af6 commit dacbb3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Run sophia
run: cargo run --bin sophia
- name: Run sophia-server
run: cargo run --bin sophia-server
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
8 changes: 2 additions & 6 deletions sophia/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,9 @@ async fn get_env_args() -> Result<Args> {
}

async fn lookup_ip(domain: &str) -> Result<IpAddr> {
let resolver = TokioAsyncResolver::tokio(
let response = TokioAsyncResolver::tokio(
ResolverConfig::default(),
ResolverOpts::default())
.map_err(|e| errno_new!("failed to new resolver, err = {}", e))?;


let response = resolver.lookup_ip(domain).await
ResolverOpts::default()).lookup_ip(domain).await
.map_err(|e| errno_new!("failed lookup_ip {} , err = {}",domain, e))?;


Expand Down
1 change: 0 additions & 1 deletion sophia/src/view_model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub use messages::ChatMessageViewModel;
pub use messages::SomeUser;
pub use user_list::UserViewModel;

pub use self::log::Log;
pub use self::log::LogViewModel;

mod app;
Expand Down

0 comments on commit dacbb3b

Please sign in to comment.