Skip to content

Commit

Permalink
refactor: improve error handling in geo_checker.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
single9 committed Jul 11, 2024
1 parent 6a9d6b7 commit e837bb6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bin/geo_checker.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use anyhow::Result;
use dns_geolocation_checker::{configs_parser::ConfigParser, ip_geo_checker::{IpGeoChecker, IpGeoCheckerTestedData}};
use dns_geolocation_checker::{
configs_parser::ConfigParser,
ip_geo_checker::{IpGeoChecker, IpGeoCheckerTestedData},
};
use std::env;

#[tokio::main]
Expand All @@ -24,7 +27,7 @@ async fn main() -> Result<()> {
.into_iter()
.filter(|r: &IpGeoCheckerTestedData| r.is_err())
.for_each(|r| {
println!(
eprintln!(
"[Mismatched] {}, ip: {}, subnet: {}, expected: {}, actual: {}, error: {:?}",
r.host,
r.ip,
Expand Down

0 comments on commit e837bb6

Please sign in to comment.