mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 17:14:06 +02:00
clippy fixes
This commit is contained in:
parent
c93fb84773
commit
c3818d3b74
1 changed files with 9 additions and 9 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue