1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-04-20 06:54:46 +00:00

use DeriveInput for input into derive macros from syn

This commit is contained in:
Dominic 2020-05-03 23:10:19 +02:00
parent f7157dcf62
commit da30f34d97
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
5 changed files with 32 additions and 26 deletions

View file

@ -9,9 +9,9 @@ use syn::{
parse::{Parse, ParseStream},
punctuated::Punctuated,
token::Comma,
DeriveInput,
Error,
Ident,
ItemStruct,
parenthesized,
parse_macro_input
};
@ -33,7 +33,7 @@ impl Parse for MethodList
fn expand(tokens : TokenStream) -> Result<TokenStream2, Error>
{
let krate = super::krate();
let input = parse_macro_input::parse::<ItemStruct>(tokens)?;
let input = parse_macro_input::parse::<DeriveInput>(tokens)?;
let ident = input.ident;
let name = ident.to_string();