clippy fixes

This commit is contained in:
Robin Appelman 2025-11-14 19:24:08 +01:00
commit c3818d3b74

View file

@ -90,11 +90,11 @@ impl Drop for ActiveProxy {
} }
// we do this here, since the proxy process won't have permissions for it anymore // we do this here, since the proxy process won't have permissions for it anymore
if let ForwardSource::Unix(path) = &source { if let ForwardSource::Unix(path) = &source
if let Err(error) = remove_file(path) { && let Err(error) = remove_file(path)
{
error!(%error, "failed to remove unix socket"); error!(%error, "failed to remove unix socket");
} }
}
}); });
} }
} }
@ -155,12 +155,12 @@ pub fn proxy(
}; };
rt.block_on(async { rt.block_on(async {
if let Some(listen_namespace) = listen_namespace { if let Some(listen_namespace) = listen_namespace
if let Err(error) = setns(listen_namespace, CloneFlags::CLONE_NEWNET) { && let Err(error) = setns(listen_namespace, CloneFlags::CLONE_NEWNET)
{
error!(%error, "Failed to join listen network namespace for proxy"); error!(%error, "Failed to join listen network namespace for proxy");
return Err(error.into()); return Err(error.into());
} }
}
let proxy = match Proxy::listen(&source) { let proxy = match Proxy::listen(&source) {
Ok(proxy) => proxy, Ok(proxy) => proxy,