Skip to content

Commit 59401e1

Browse files
committed
Fix windows dead code
1 parent f0f3b23 commit 59401e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pinger/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#[cfg(unix)]
2-
use crate::linux::LinuxPinger;
31
/// Pinger
42
/// This crate exposes a simple function to ping remote hosts across different operating systems.
53
/// Example:
@@ -28,7 +26,9 @@ use std::{fmt, io, thread};
2826
use target::Target;
2927
use thiserror::Error;
3028

29+
#[cfg(unix)]
3130
pub mod linux;
31+
#[cfg(target_os = "macos")]
3232
pub mod macos;
3333
#[cfg(windows)]
3434
pub mod windows;
@@ -220,7 +220,7 @@ pub fn get_pinger(options: PingOptions) -> std::result::Result<Arc<dyn Pinger>,
220220
} else if cfg!(target_os = "macos") {
221221
Ok(Arc::new(macos::MacOSPinger::from_options(options)?))
222222
} else {
223-
Ok(Arc::new(LinuxPinger::from_options(options)?))
223+
Ok(Arc::new(linux::LinuxPinger::from_options(options)?))
224224
}
225225
}
226226
}

0 commit comments

Comments
 (0)