Skip to content

Commit

Permalink
chore: remove windows cfg (#11002)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Sep 18, 2024
1 parent ef06c85 commit 000b412
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/net/nat/src/net_if.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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) => {
Expand All @@ -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() {
Expand Down

0 comments on commit 000b412

Please sign in to comment.