flake.lock, Cargo.{toml,lock}: bump deps

This commit is contained in:
2026-04-20 22:00:31 +09:00
parent 9361dcf941
commit f1eced9e23
5 changed files with 224 additions and 257 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ async fn main() -> anyhow::Result<()> {
)?;
let fd_map: HashMap<String, OwnedFd> = HashMap::from_iter(
sd_notify::listen_fds_with_names(false)?.map(|(fd_num, name)| {
sd_notify::listen_fds_with_names()?.map(|(fd_num, name)| {
(
name.clone(),
// SAFETY: please don't mess around with file descriptors in random places
@@ -71,7 +71,7 @@ async fn main() -> anyhow::Result<()> {
client_server_token_.cancelled().await;
tracing::info!("RWHOD client-server is now accepting connections");
#[cfg(feature = "systemd")]
sd_notify::notify(true, &[sd_notify::NotifyState::Ready]).ok();
sd_notify::notify(&[sd_notify::NotifyState::Ready]).ok();
Ok::<(), anyhow::Error>(())
});
+24 -15
View File
@@ -1,3 +1,5 @@
use std::os::fd::OwnedFd;
use anyhow::Context;
use serde::{Deserialize, Serialize};
use zlink::{ReplyError, service::MethodReply};
@@ -153,37 +155,44 @@ impl VarlinkRoowhoo2ClientServer {
}
}
impl zlink::Service for VarlinkRoowhoo2ClientServer {
impl zlink::Service<zlink::unix::Stream> for VarlinkRoowhoo2ClientServer {
type MethodCall<'de> = VarlinkMethod;
type ReplyParams<'se> = VarlinkReply;
type ReplyStreamParams = ();
type ReplyStream = futures_util::stream::Empty<zlink::Reply<()>>;
type ReplyStream = futures_util::stream::Empty<(zlink::Reply<()>, Vec<OwnedFd>)>;
type ReplyError<'se> = VarlinkReplyError;
async fn handle<'service, Sock: zlink::connection::Socket>(
async fn handle<'service>(
&'service mut self,
call: &'service zlink::Call<Self::MethodCall<'_>>,
_conn: &mut zlink::Connection<Sock>,
) -> MethodReply<Self::ReplyParams<'service>, Self::ReplyStream, Self::ReplyError<'service>>
{
_conn: &mut zlink::Connection<zlink::unix::Stream>,
_fds: Vec<std::os::fd::OwnedFd>,
) -> zlink::service::HandleResult<
Self::ReplyParams<'service>,
Self::ReplyStream,
Self::ReplyError<'service>,
> {
match call.method() {
VarlinkMethod::Rwhod(VarlinkRwhodClientRequest::Rwho { all }) => {
VarlinkMethod::Rwhod(VarlinkRwhodClientRequest::Rwho { all }) => (
MethodReply::Single(Some(VarlinkReply::Rwhod(VarlinkRwhodClientResponse::Rwho(
self.handle_rwho_request(*all).await,
))))
}
VarlinkMethod::Rwhod(VarlinkRwhodClientRequest::Ruptime) => {
)))),
Default::default(),
),
VarlinkMethod::Rwhod(VarlinkRwhodClientRequest::Ruptime) => (
MethodReply::Single(Some(VarlinkReply::Rwhod(
VarlinkRwhodClientResponse::Ruptime(self.handle_ruptime_request().await),
)))
}
VarlinkMethod::Finger(VarlinkFingerClientRequest::Finger { user_queries }) => {
))),
Default::default(),
),
VarlinkMethod::Finger(VarlinkFingerClientRequest::Finger { user_queries }) => (
MethodReply::Single(Some(VarlinkReply::Finger(
VarlinkFingerClientResponse::Finger(
self.handle_finger_request(user_queries.clone()).await,
),
)))
}
))),
Default::default(),
),
}
}
}