diff --git a/proxmox-api-macro/src/api_macro.rs b/proxmox-api-macro/src/api_macro.rs index 8f4f7e75..04fdcc35 100644 --- a/proxmox-api-macro/src/api_macro.rs +++ b/proxmox-api-macro/src/api_macro.rs @@ -196,7 +196,6 @@ fn handle_function( if item.asyncness.is_some() { // An async function is expected to return its value, so we wrap it a bit: - body.push(quote! { // Our helper type derefs to a wrapper performing input validation and returning a // Pin>. diff --git a/proxmox-api/src/lib.rs b/proxmox-api/src/lib.rs index 938343b1..5cb6f340 100644 --- a/proxmox-api/src/lib.rs +++ b/proxmox-api/src/lib.rs @@ -317,6 +317,9 @@ unconstrained_api_type! {&str} unconstrained_api_type! {String, isize, usize, i64, u64, i32, u32, i16, u16, i8, u8, f64, f32} unconstrained_api_type! {Vec} +// Raw return types are also okay: +unconstrained_api_type! {Response} + // FIXME: make const once feature(const_fn) is stable! pub fn get_type_info() -> &'static TypeInfo { T::type_info()