Skip to content

Commit

Permalink
Resolving endpoint Macro Expansion Errors (#506)
Browse files Browse the repository at this point in the history
* Implement ToSchema for PhantomData<T>

* Add introduction of salvo-cli

* Optimization: take an uncommon name to avoid bugs with the same name as the user's

* Fix the code, pass the test

* Resolving Macro Expansion Errors
  • Loading branch information
fankaiLiu authored Nov 23, 2023
1 parent 61349ed commit 8325670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/endpoint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn handle_fn(salvo: &Ident, oapi: &Ident, sig: &Signature) -> syn::Result<(Token
for input in &sig.inputs {
match parse_input_type(input) {
InputType::Request(_pat) => {
call_args.push(Ident::new("req", Span::call_site()));
call_args.push(Ident::new("__macro_generated_req", Span::call_site()));
}
InputType::Depot(_pat) => {
call_args.push(Ident::new("depot", Span::call_site()));
Expand Down

0 comments on commit 8325670

Please sign in to comment.