mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
clippy fixes
This commit is contained in:
parent
125b68e08a
commit
b1b4ac3ce9
6 changed files with 15 additions and 23 deletions
10
src/cloud.rs
10
src/cloud.rs
|
|
@ -711,15 +711,14 @@ impl Cloud {
|
|||
.await
|
||||
.into_diagnostic()
|
||||
.wrap_err("Failed to remove network")?;
|
||||
if self.workdir.exists() {
|
||||
if let Err(e) = remove_dir_all(self.workdir)
|
||||
if self.workdir.exists()
|
||||
&& let Err(e) = remove_dir_all(self.workdir)
|
||||
.await
|
||||
.into_diagnostic()
|
||||
.wrap_err("Failed to remove work directory")
|
||||
{
|
||||
eprintln!("{}", e);
|
||||
}
|
||||
}
|
||||
|
||||
remove_worktrees_for_instance(config, &self.id).await?;
|
||||
|
||||
|
|
@ -804,8 +803,8 @@ impl Cloud {
|
|||
let mut containers_by_id: HashMap<String, (Option<_>, Vec<_>)> = HashMap::new();
|
||||
for container in containers {
|
||||
let labels = container.labels.clone().unwrap_or_default();
|
||||
if let Some(cloud_id) = labels.get("haze-cloud-id") {
|
||||
if match filter.as_ref() {
|
||||
if let Some(cloud_id) = labels.get("haze-cloud-id")
|
||||
&& match filter.as_ref() {
|
||||
Some(filter) => cloud_id.contains(filter),
|
||||
None => true,
|
||||
} {
|
||||
|
|
@ -816,7 +815,6 @@ impl Cloud {
|
|||
entry.1.push(container)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mut sortable_containers: Vec<_> = containers_by_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue