This commit is contained in:
müde 2026-05-14 22:58:25 +02:00
parent fef2dee92a
commit 1c6d7f7a8f
4 changed files with 15 additions and 8 deletions

View file

@ -134,7 +134,15 @@
clippy = naersk-lib.buildPackage {
src = ./.;
mode = "clippy";
cargoClippyOptions = orig: orig ++ [ "--all-targets" "--" "-D" "warnings" ];
cargoClippyOptions =
orig:
orig
++ [
"--all-targets"
"--"
"-D"
"warnings"
];
};
}
);

View file

@ -18,11 +18,7 @@ pub struct AgentSocket {
pub handle: JoinHandle<()>,
}
pub fn start(
agent: &str,
socket_path: &Path,
broker: Arc<Broker>,
) -> Result<AgentSocket> {
pub fn start(agent: &str, socket_path: &Path, broker: Arc<Broker>) -> Result<AgentSocket> {
let agent = agent.to_owned();
if let Some(parent) = socket_path.parent() {
std::fs::create_dir_all(parent)

View file

@ -36,7 +36,8 @@ impl Approvals {
}
let conn = Connection::open(path)
.with_context(|| format!("open approvals db {}", path.display()))?;
conn.execute_batch(SCHEMA).context("apply approvals schema")?;
conn.execute_batch(SCHEMA)
.context("apply approvals schema")?;
Ok(Self {
conn: Mutex::new(conn),
})

View file

@ -81,7 +81,9 @@ async fn main() -> Result<()> {
}
Cmd::List => render(client::request(&cli.socket, HostRequest::List).await?),
Cmd::Pending => render(client::request(&cli.socket, HostRequest::Pending).await?),
Cmd::Approve { id } => render(client::request(&cli.socket, HostRequest::Approve { id }).await?),
Cmd::Approve { id } => {
render(client::request(&cli.socket, HostRequest::Approve { id }).await?)
}
Cmd::Deny { id } => render(client::request(&cli.socket, HostRequest::Deny { id }).await?),
}
}