diff --git a/hive-c0re/src/actions.rs b/hive-c0re/src/actions.rs index df758a3..bef28f6 100644 --- a/hive-c0re/src/actions.rs +++ b/hive-c0re/src/actions.rs @@ -4,9 +4,7 @@ //! shape they want (HTTP redirect vs JSON). use anyhow::Result; -use hive_sh4re::{ - ApprovalStatus, HelperEvent, MANAGER_AGENT, Message, SYSTEM_SENDER, -}; +use hive_sh4re::{ApprovalStatus, HelperEvent, MANAGER_AGENT, Message, SYSTEM_SENDER}; use crate::coordinator::Coordinator; use crate::lifecycle; diff --git a/hive-c0re/src/dashboard.rs b/hive-c0re/src/dashboard.rs index 9d46b3c..b09bd5e 100644 --- a/hive-c0re/src/dashboard.rs +++ b/hive-c0re/src/dashboard.rs @@ -9,6 +9,7 @@ use std::path::Path; use std::sync::Arc; use anyhow::{Context, Result}; +use axum::extract::Form; use axum::{ Router, extract::{Path as AxumPath, State}, @@ -19,7 +20,6 @@ use axum::{ }, routing::{get, post}, }; -use axum::extract::Form; use hive_sh4re::{Approval, MANAGER_AGENT, Message}; use serde::Deserialize; use tokio_stream::wrappers::BroadcastStream; @@ -215,9 +215,7 @@ fn gc_orphans(coord: &Coordinator, approvals: Vec) -> Vec { if Coordinator::agent_proposed_dir(&a.agent).exists() { true } else { - let _ = coord - .approvals - .mark_failed(a.id, "agent state dir missing"); + let _ = coord.approvals.mark_failed(a.id, "agent state dir missing"); tracing::info!(id = a.id, agent = %a.agent, "auto-failed orphan approval"); false } diff --git a/hive-c0re/src/lifecycle.rs b/hive-c0re/src/lifecycle.rs index 2ad9188..dcce16c 100644 --- a/hive-c0re/src/lifecycle.rs +++ b/hive-c0re/src/lifecycle.rs @@ -296,9 +296,8 @@ fn set_resource_limits(container: &str) -> Result<()> { let dir = format!("/run/systemd/system/container@{container}.service.d"); std::fs::create_dir_all(&dir).with_context(|| format!("create {dir}"))?; let path = format!("{dir}/hyperhive-limits.conf"); - let content = format!( - "[Service]\nMemoryMax={DEFAULT_MEMORY_MAX}\nCPUQuota={DEFAULT_CPU_QUOTA}\n", - ); + let content = + format!("[Service]\nMemoryMax={DEFAULT_MEMORY_MAX}\nCPUQuota={DEFAULT_CPU_QUOTA}\n",); std::fs::write(&path, content).with_context(|| format!("write {path}"))?; tracing::info!( %path,