Fix formatting
This commit is contained in:
parent
55c7c5db99
commit
0be3c92d27
|
@ -30,7 +30,6 @@ pub fn from_xml(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
|||
|
||||
struct ContainerMeta<'input> {
|
||||
input: &'input DeriveInput,
|
||||
|
||||
ns: NamespaceMeta,
|
||||
rename: Option<Literal>,
|
||||
rename_all: RenameRule,
|
||||
|
@ -161,7 +160,6 @@ impl VariantMeta {
|
|||
for (item, span) in meta_items(&input.attrs) {
|
||||
match item {
|
||||
MetaItem::Rename(lit) => rename = Some(lit.to_token_stream()),
|
||||
|
||||
MetaItem::Attribute => {
|
||||
return Err(syn::Error::new(
|
||||
span,
|
||||
|
|
|
@ -26,11 +26,10 @@ pub fn to_xml(input: &syn::DeriveInput) -> proc_macro2::TokenStream {
|
|||
}
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
fn serialize_enum(
|
||||
input: &syn::DeriveInput,
|
||||
data: &syn::DataEnum,
|
||||
meta: ContainerMeta
|
||||
meta: ContainerMeta,
|
||||
) -> TokenStream {
|
||||
let ident = &input.ident;
|
||||
let mut variants = TokenStream::new();
|
||||
|
@ -39,7 +38,7 @@ fn serialize_enum(
|
|||
let v_ident = &variant.ident;
|
||||
let meta = match VariantMeta::from_variant(variant, &meta) {
|
||||
Ok(meta) => meta,
|
||||
Err(err) => return err.to_compile_error()
|
||||
Err(err) => return err.to_compile_error(),
|
||||
};
|
||||
|
||||
let serialize_as = meta.serialize_as;
|
||||
|
@ -47,7 +46,6 @@ fn serialize_enum(
|
|||
}
|
||||
|
||||
let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();
|
||||
|
||||
quote!(
|
||||
impl #impl_generics ToXml for #ident #ty_generics #where_clause {
|
||||
fn serialize<W: ::core::fmt::Write + ?::core::marker::Sized>(
|
||||
|
|
Loading…
Reference in New Issue