Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove windows cfg #11002

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading