removed legacy code and clippy fixes + fixed ci
Release / Build and Release (push) Failing after 38s

This commit is contained in:
2026-04-01 14:01:16 +02:00
parent bd18bbf866
commit 7a8f70938e
9 changed files with 22 additions and 61 deletions
+5 -6
View File
@@ -175,12 +175,11 @@ fn get_primary_interface() -> Result<String> {
fn get_ip_address(interface: &str) -> Option<String> {
let addrs = getifaddrs().ok()?;
for ifaddr in addrs {
if ifaddr.interface_name == interface {
if let Some(address) = ifaddr.address {
if let Some(sockaddr) = address.as_sockaddr_in() {
return Some(sockaddr.ip().to_string());
}
}
if ifaddr.interface_name == interface
&& let Some(address) = ifaddr.address
&& let Some(sockaddr) = address.as_sockaddr_in()
{
return Some(sockaddr.ip().to_string());
}
}
None