mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
clippy fixes
This commit is contained in:
parent
c93fb84773
commit
c3818d3b74
1 changed files with 9 additions and 9 deletions
|
|
@ -90,10 +90,10 @@ impl Drop for ActiveProxy {
|
|||
}
|
||||
|
||||
// we do this here, since the proxy process won't have permissions for it anymore
|
||||
if let ForwardSource::Unix(path) = &source {
|
||||
if let Err(error) = remove_file(path) {
|
||||
error!(%error, "failed to remove unix socket");
|
||||
}
|
||||
if let ForwardSource::Unix(path) = &source
|
||||
&& let Err(error) = remove_file(path)
|
||||
{
|
||||
error!(%error, "failed to remove unix socket");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -155,11 +155,11 @@ pub fn proxy(
|
|||
};
|
||||
|
||||
rt.block_on(async {
|
||||
if let Some(listen_namespace) = listen_namespace {
|
||||
if let Err(error) = setns(listen_namespace, CloneFlags::CLONE_NEWNET) {
|
||||
error!(%error, "Failed to join listen network namespace for proxy");
|
||||
return Err(error.into());
|
||||
}
|
||||
if let Some(listen_namespace) = listen_namespace
|
||||
&& let Err(error) = setns(listen_namespace, CloneFlags::CLONE_NEWNET)
|
||||
{
|
||||
error!(%error, "Failed to join listen network namespace for proxy");
|
||||
return Err(error.into());
|
||||
}
|
||||
|
||||
let proxy = match Proxy::listen(&source) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue