diff --git a/proxmox-api-macro/src/api/method.rs b/proxmox-api-macro/src/api/method.rs index 3de87e30..e93197a7 100644 --- a/proxmox-api-macro/src/api/method.rs +++ b/proxmox-api-macro/src/api/method.rs @@ -36,9 +36,7 @@ pub fn handle_method(mut attribs: JSONObject, mut func: syn::ItemFn) -> Result = 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