refactor(#2302): type socket wire fields as ident, validated by serde on deserialize
This commit is contained in:
parent
bf644cc126
commit
84b750fba5
33 changed files with 333 additions and 263 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue