Skip to content

Commit 0cb96df

Browse files
refactor(prompt): update return type handling
1 parent 4628720 commit 0cb96df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/rmcp-macros/src/prompt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub fn prompt(attr: TokenStream, input: TokenStream) -> syn::Result<TokenStream>
123123
// Modify the input function for async support (same as tool macro)
124124
if fn_item.sig.asyncness.is_some() {
125125
// 1. remove asyncness from sig
126-
// 2. make return type: `futures::future::BoxFuture<'_, #ReturnType>`
126+
// 2. make return type: `std::pin::Pin<Box<dyn std::future::Future<Output = #ReturnType> + Send + '_>>`
127127
// 3. make body: { Box::pin(async move { #body }) }
128128
let new_output = syn::parse2::<ReturnType>({
129129
let mut lt = quote! { 'static };

0 commit comments

Comments
 (0)