chore: fix typos (#79)
This commit is contained in:
parent
4ca00c2052
commit
6a648b8827
1 changed files with 14 additions and 14 deletions
|
|
@ -360,7 +360,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
|
|||
// async fn #tool_tool_call(context: rmcp::handler::server::tool::ToolCallContext<'_, Self>)
|
||||
// -> std::result::Result<rmcp::model::CallToolResult, rmcp::Error>
|
||||
//
|
||||
// and the block part shoule be like:
|
||||
// and the block part should be like:
|
||||
// {
|
||||
// use rmcp::handler::server::tool::*;
|
||||
// let (t0, context) = <T0>::from_tool_call_context_part(context)?;
|
||||
|
|
@ -383,8 +383,8 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
|
|||
// for receiver type, name it as __rmcp_tool_receiver
|
||||
let is_async = input_fn.sig.asyncness.is_some();
|
||||
let receiver_ident = || Ident::new("__rmcp_tool_receiver", proc_macro2::Span::call_site());
|
||||
// generate the extraction part for trival args
|
||||
let trival_args = input_fn
|
||||
// generate the extraction part for trivial args
|
||||
let trivial_args = input_fn
|
||||
.sig
|
||||
.inputs
|
||||
.iter()
|
||||
|
|
@ -413,8 +413,8 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
|
|||
Some(line)
|
||||
}
|
||||
});
|
||||
let trival_argrextraction_part = quote! {
|
||||
#(#trival_args)*
|
||||
let trivial_argrextraction_part = quote! {
|
||||
#(#trivial_args)*
|
||||
};
|
||||
let processed_argrextraction_part = match &mut tool_macro_attrs.params {
|
||||
ToolParams::Aggregated { rust_type } => {
|
||||
|
|
@ -441,7 +441,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
|
|||
}
|
||||
};
|
||||
// generate the execution part
|
||||
// has reveiver?
|
||||
// has receiver?
|
||||
let params = &input_fn
|
||||
.sig
|
||||
.inputs
|
||||
|
|
@ -487,7 +487,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
|
|||
#raw_fn_vis async fn #tool_call_fn_ident(context: rmcp::handler::server::tool::ToolCallContext<'_, Self>)
|
||||
-> std::result::Result<rmcp::model::CallToolResult, rmcp::Error> {
|
||||
use rmcp::handler::server::tool::*;
|
||||
#trival_argrextraction_part
|
||||
#trivial_argrextraction_part
|
||||
#processed_argrextraction_part
|
||||
#call
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue