1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-10-01 08:44:09 +02:00

clippy fixes

This commit is contained in:
Robin Appelman 2026-08-17 19:04:46 +02:00
commit b1b4ac3ce9
6 changed files with 15 additions and 23 deletions

View file

@ -201,12 +201,11 @@ async fn serve(instances: ActiveInstances, listen: String, base_address: String)
}
} else {
let listen: PathBuf = listen.into();
if let Some(parent) = listen.parent() {
if !parent.exists() {
if let Some(parent) = listen.parent()
&& !parent.exists() {
create_dir_all(parent).into_diagnostic()?;
set_permissions(parent, PermissionsExt::from_mode(0o755)).into_diagnostic()?;
}
}
let _ = tokio::fs::remove_file(&listen).await;
let listener = UnixListener::bind(&listen).unwrap();