mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 16:54:08 +02:00
clippy fixes
This commit is contained in:
parent
125b68e08a
commit
b1b4ac3ce9
6 changed files with 15 additions and 23 deletions
|
|
@ -10,13 +10,11 @@ pub async fn clear_networks(docker: &Docker, instances: &[Cloud]) -> Result<()>
|
|||
.into_diagnostic()
|
||||
.wrap_err("Failed to list docker networks")?;
|
||||
for network in networks {
|
||||
if let Some(name) = network.name.as_deref() {
|
||||
if let Some(id) = name.strip_prefix("haze-") {
|
||||
if !instances.iter().any(|cloud| cloud.id == id) {
|
||||
if let Some(name) = network.name.as_deref()
|
||||
&& let Some(id) = name.strip_prefix("haze-")
|
||||
&& !instances.iter().any(|cloud| cloud.id == id) {
|
||||
docker.remove_network(name).await.ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue