mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: remove windows cfg (#11002)
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
//! IP resolution on non-host Docker network.
|
||||
|
||||
#![cfg(not(target_os = "windows"))]
|
||||
|
||||
use std::{io, net::IpAddr};
|
||||
|
||||
/// The 'eth0' interface tends to be the default interface that docker containers use to
|
||||
@ -20,7 +18,6 @@ pub enum NetInterfaceError {
|
||||
}
|
||||
|
||||
/// Reads IP of OS interface with given name, if exists.
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
pub fn resolve_net_if_ip(if_name: &str) -> Result<IpAddr, NetInterfaceError> {
|
||||
match if_addrs::get_if_addrs() {
|
||||
Ok(ifs) => {
|
||||
@ -39,9 +36,8 @@ pub fn resolve_net_if_ip(if_name: &str) -> Result<IpAddr, NetInterfaceError> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
use super::*;
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
#[test]
|
||||
fn read_docker_if_addr() {
|
||||
|
||||
Reference in New Issue
Block a user