Skip to content

Commit

Permalink
fix windows build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Oct 6, 2021
1 parent eff3853 commit 27f4493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions crates/shadowsocks-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
//!
//! These defined server will be used with a load balancing algorithm.

#[cfg(any(unix, target_os = "android", feature = "local-flow-stat"))]
use std::path::PathBuf;
use std::{
convert::{From, Infallible},
default::Default,
Expand All @@ -51,7 +49,7 @@ use std::{
io::Read,
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6},
option::Option,
path::Path,
path::{Path, PathBuf},
str::FromStr,
string::ToString,
time::Duration,
Expand Down
8 changes: 4 additions & 4 deletions crates/shadowsocks/src/dns_resolver/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
fmt::{self, Debug},
io::{self, Error, ErrorKind},
net::SocketAddr,
time::{Duration, Instant},
time::Instant,
};

#[cfg(feature = "trust-dns")]
Expand All @@ -16,9 +16,9 @@ use cfg_if::cfg_if;
#[cfg(feature = "trust-dns")]
use log::error;
use log::{log_enabled, trace, Level};
use tokio::net::lookup_host;
#[cfg(feature = "trust-dns")]
use tokio::task::JoinHandle;
use tokio::{net::lookup_host, time};
#[cfg(feature = "trust-dns")]
use trust_dns_resolver::{config::ResolverConfig, TokioAsyncResolver};

Expand Down Expand Up @@ -135,11 +135,11 @@ cfg_if! {

#[cfg(all(feature = "trust-dns", unix, not(target_os = "android")))]
async fn trust_dns_notify_update_dns(resolver: Arc<TrustDnsSystemResolver>) -> notify::Result<()> {
use std::path::Path;
use std::{path::Path, time::Duration};

use log::debug;
use notify::{Event, EventKind, RecommendedWatcher, RecursiveMode, Result as NotifyResult, Watcher};
use tokio::sync::watch;
use tokio::{sync::watch, time};

use super::trust_dns_resolver::create_resolver;

Expand Down

0 comments on commit 27f4493

Please sign in to comment.