diff --git a/derive/src/de.rs b/derive/src/de.rs index 174ac1b..9dc8e98 100644 --- a/derive/src/de.rs +++ b/derive/src/de.rs @@ -2,7 +2,7 @@ use crate::{attr, bound}; use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::{ - parse_quote, Data, DataEnum, DataStruct, DeriveInput, Error, Fields, FieldsNamed, Ident, Result, + parse_quote, Data, DataEnum, DataStruct, DeriveInput, Error, Fields, FieldsNamed, Result, }; pub fn derive(input: DeriveInput) -> Result { @@ -26,10 +26,6 @@ pub fn derive(input: DeriveInput) -> Result { pub fn derive_struct(input: &DeriveInput, fields: &FieldsNamed) -> Result { let ident = &input.ident; let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - let dummy = Ident::new( - &format!("_IMPL_MINIDESERIALIZE_FOR_{}", ident), - Span::call_site(), - ); let fieldname = fields.named.iter().map(|f| &f.ident).collect::>(); let fieldty = fields.named.iter().map(|f| &f.ty); @@ -46,7 +42,7 @@ pub fn derive_struct(input: &DeriveInput, fields: &FieldsNamed) -> Result, @@ -117,10 +113,6 @@ pub fn derive_enum(input: &DeriveInput, enumeration: &DataEnum) -> Result Result, diff --git a/derive/src/ser.rs b/derive/src/ser.rs index 516f603..32f5fbf 100644 --- a/derive/src/ser.rs +++ b/derive/src/ser.rs @@ -2,7 +2,7 @@ use crate::{attr, bound}; use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::{ - parse_quote, Data, DataEnum, DataStruct, DeriveInput, Error, Fields, FieldsNamed, Ident, Result, + parse_quote, Data, DataEnum, DataStruct, DeriveInput, Error, Fields, FieldsNamed, Result, }; pub fn derive(input: DeriveInput) -> Result { @@ -26,10 +26,6 @@ pub fn derive(input: DeriveInput) -> Result { fn derive_struct(input: &DeriveInput, fields: &FieldsNamed) -> Result { let ident = &input.ident; let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - let dummy = Ident::new( - &format!("_IMPL_MINISERIALIZE_FOR_{}", ident), - Span::call_site(), - ); let fieldname = &fields.named.iter().map(|f| &f.ident).collect::>(); let fieldstr = fields @@ -46,7 +42,7 @@ fn derive_struct(input: &DeriveInput, fields: &FieldsNamed) -> Result miniserde::ser::Fragment { miniserde::ser::Fragment::Map(miniserde::__private::Box::new(__Map { @@ -89,10 +85,6 @@ fn derive_enum(input: &DeriveInput, enumeration: &DataEnum) -> Result Result miniserde::ser::Fragment { match self {