refactor(#2302): type socket wire fields as ident, validated by serde on deserialize

This commit is contained in:
damocles 2026-07-20 21:21:03 +02:00 committed by mara
commit 84b750fba5
33 changed files with 333 additions and 263 deletions

View file

@ -20,7 +20,7 @@ pub(crate) async fn quota_show(socket: &Path, name: Option<&str>) -> Result<()>
let resp = crate::client::request(
socket,
hive_host_sock::HostRequest::QuotaShow {
name: name.map(str::to_owned),
name: name.map(crate::util::parse_ident).transpose()?,
},
)
.await
@ -60,7 +60,7 @@ pub(crate) async fn quota_limit(socket: &Path, name: &str, size: &str) -> Result
daemon_request(
socket,
hive_host_sock::HostRequest::QuotaLimit {
name: name.to_owned(),
name: crate::util::parse_ident(name)?,
limit,
},
"quota",