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:
parent
f7157dcf62
commit
da30f34d97
5 changed files with 32 additions and 26 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue