api-macro: minor cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
b67e2f7214
commit
0b2c9b95b4
@ -36,9 +36,7 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result<T
|
||||
|
||||
let mut returns_schema: Option<Schema> = attribs
|
||||
.remove("returns")
|
||||
.map(|ret| ret.into_object("return schema definition"))
|
||||
.transpose()?
|
||||
.map(|ret| ret.try_into())
|
||||
.map(|ret| ret.into_object("return schema definition")?.try_into())
|
||||
.transpose()?;
|
||||
|
||||
let protected: bool = attribs
|
||||
|
Loading…
Reference in New Issue
Block a user