Skip to content

Commit

Permalink
remove extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
holykol committed May 20, 2024
1 parent fee523a commit 7e28c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion macros/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parity-scale-codec.workspace = true
proc-macro-error.workspace = true
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] }
syn = { workspace = true, features = ["full", "extra-traits"] }

[dev-dependencies]
insta.workspace = true
Expand Down
7 changes: 3 additions & 4 deletions macros/core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ use proc_macro_error::abort;
use quote::quote;
use std::collections::BTreeMap;
use syn::{
punctuated::Punctuated, visit_mut::VisitMut, GenericArgument, Ident, ImplItemFn, ItemImpl,
Path, PathArguments, Type, TypeParamBound, TypePath, Visibility, WhereClause, WherePredicate,
GenericArgument, Ident, ImplItemFn, ItemImpl, Path, PathArguments, Type, TypeParamBound,
Visibility, WhereClause, WherePredicate,
};

pub fn gservice(service_impl_tokens: TokenStream2) -> TokenStream2 {
let service_impl: ItemImpl = syn::parse2(service_impl_tokens).unwrap_or_else(|err| {
let service_impl = syn::parse2(service_impl_tokens).unwrap_or_else(|err| {
abort!(
err.span(),
"`gservice` attribute can be applied to impls only: {}",
Expand Down Expand Up @@ -110,7 +110,6 @@ pub fn gservice(service_impl_tokens: TokenStream2) -> TokenStream2 {
let handler_meta_variant = {
let params_struct_ident = handler_generator.params_struct_ident();
let result_type = handler_generator.result_type();

let handler_route_ident = Ident::new(handler_route, Span::call_site());

quote!(#handler_route_ident(#params_struct_ident, #result_type))
Expand Down

0 comments on commit 7e28c29

Please sign in to comment.